Bug 145671 - EDITING: Calc URL open twice in browser. Cell Edit mode.
Summary: EDITING: Calc URL open twice in browser. Cell Edit mode.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Hyperlink-Calc
  Show dependency treegraph
 
Reported: 2021-11-14 07:24 UTC by Francewhoa
Modified: 2022-03-09 13:14 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Calc links open in browser twice---bugs.documentfoundation.org---145671---Francewhoa---v2.ods (9.01 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-11-14 07:42 UTC, Francewhoa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francewhoa 2021-11-14 07:24:50 UTC Comment hidden (obsolete)
Comment 1 Francewhoa 2021-11-14 07:42:27 UTC
Created attachment 176240 [details]
Calc links open in browser twice---bugs.documentfoundation.org---145671---Francewhoa---v2.ods

Find steps to reproduce above
Comment 2 Francewhoa 2021-11-14 08:01:21 UTC
Hello LibreOffice enthusiasts :)

Summary:
Using LibreOffice Calc, when a cell is into its Edit mode (F2), CTRL left-click URL open twice in browser

Any volunteer for a patch? I would be happy to contribute testing and documentation if needed

You're welcome to ask me if you have any questions, or need anything else about this challenge

Cheers,

Francois Carpentier (Francewhoa)


Steps to Reproduce:
1. In my 1st comment below, I'll attach a Calc file. Open this file. Select the cell A1.

2. Press F2 to switch this cell to its Edit mode*

______*Note : This second step above is important. Otherwise, this challenge can’t be reproduced.

3. Press & hold CTLR key. Then within this cell, left-click on this link https://ask.libreoffice.org/t/calc-links-open-in-browser-twice/42876

4. This link will open into your browser. Wait 2 to 5 seconds. 

Actual Results:
This same link will automatically open again into your same browser. So somehow the same link is open twice. This is the challenge.


Expected Results:
The URL open only once


Reproducible: Always


User Profile Reset: No



Additional Info:


LibreOffice:
• Version: 7.0.4.2
• Build ID: 00(Build:2)
• CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
• Locale: fr-CA (fr_CA.UTF-8); Langue IHM : fr-FR
• Debian package version: 1:7.0.4-4+deb11u1_bpo10+1
• Calc: threaded


System Linux:
• Base: Debian 10 Buster, 64-bit
• Gnome: 3.30.2
• Kernel: 5.10.0-0.bpo.7-amd64 #1 SMP Debian 5.10.40-1~bpo10+1 (2021-06-04) x86_64 GNU/Linux


Hardware:
• Dual screen
• Open source video driver
• Initial Debian install: Netinstall at http://cdimage.debian.org/cdimage/jessie_di_alpha_1/amd64/iso-cd/debian-jessie-DI-a1-amd64-netinst.iso`  


Firefox:
• 78.15.0esr (64-bit)


System Windows:
• According to EarnestAl, this challenge can also be reproduced with Windows 10, LO 6.4.7.2, 7.1.5.2 & 7.2.2.2. Source https://ask.libreoffice.org/t/calc-links-open-in-browser-twice/42876/5?u=francewhoa


What I tried that was effective:
• All that I tried failed. This challenge can be reproduced each time.


What I tried that was ineffective:
• Use a fresh new Calc spreadsheet
• Use different browser


Suggested fix:
• Maybe some of the code from this patch from Michael Weghorn could be recycled?
___• This patch is for a UNO hyperlink control. It will be available in LO 7.0.4.
___• Related ticket at https://bugs.documentfoundation.org/show_bug.cgi?id=138187
___• Commit at https://git.libreoffice.org/core/commit/8019531fd5735515572da5a30fd0e1b85680f448
Comment 3 m_a_riosv 2021-11-14 13:50:02 UTC
Reproducible,
Version: 7.2.3.1 (x64) / LibreOffice Community
Build ID: 1d5dee817bde88d78dbcc0d00f88492568e131d5
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL.

Seems to me a corner case.
Comment 4 Michael Weghorn 2021-11-15 10:28:03 UTC
Bibisected to:

commit 91b431f88e7abaa3a088b8caf1bdd7e5fe0bf120
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Date:   Mon Aug 19 15:31:14 2019 +0200

    tdf#121039 Open URL also when in edit mode
    
    Change-Id: Ib51ced376bd2c8476f4f44629040e277960f8f1c
    Reviewed-on: https://gerrit.libreoffice.org/77727
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>


Adding CC: to Samuel Mehrbrodt
Comment 5 Commit Notification 2021-12-06 13:12:55 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b9362e87a3646a6693b81fb0d40e28ce7813a251

tdf#145671 Don't open URL twice in cell edit mode

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2021-12-09 12:07:12 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/47d3bd0785869b05497f8ece239eed24e00a1aea

tdf#145671 Don't open URL twice in cell edit mode

It will be available in 7.3.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.