Bug 86873 - Edit hyperlink by selecting it from right to left causes text to be blank in dialog
Summary: Edit hyperlink by selecting it from right to left causes text to be blank in ...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyperlink
  Show dependency treegraph
 
Reported: 2014-11-30 12:08 UTC by Alex Granni
Modified: 2017-08-08 14:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of issue in action (69.03 KB, image/png)
2014-11-30 12:08 UTC, Alex Granni
Details
Sample document to easy reproduce the issue (8.92 KB, application/vnd.oasis.opendocument.text)
2014-11-30 12:09 UTC, Alex Granni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Granni 2014-11-30 12:08:28 UTC
Created attachment 110262 [details]
Screenshot of issue in action

If you create a hyperlink with a single character label, if you select text from right to left it will cause text field to be empty in Edit Hyperlink interface. It works as expected if selected from left to right.
After editing the link if you don't manually restore the text, hyperlink editor will automatically replace the text / label of hyperlink with the link itself. Exactly what happens when no text/label is supplied to a freshly created hyperlink.
Attached a screenshot of issue and a sample document.
Comment 1 Alex Granni 2014-11-30 12:09:37 UTC
Created attachment 110263 [details]
Sample document to easy reproduce the issue
Comment 2 Yousuf Philips (jay) (retired) 2014-11-30 15:06:55 UTC
Hello Alex,

Thank you for submitting the bug. I can confirm that the bug is available in 3.3.0 and master on Linux.

I can confirm that this happens with a single character or multiple characters in the text of the hyperlink. The main issue is that right to left selection to the beginning of the text is causing the problem.

Version: 4.5.0.0.alpha0+
Build ID: 8bc56801af0540c0496c1f8ddd335578a8791017
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-11-28_23:01:06
Comment 3 zwerk 2015-01-22 08:11:43 UTC
I have basically the same problem when selecting a hyperlink from right to left, although it occurs only when you start dragging in a very pixel-precise small area exactly on the right.

But in my case the problem is more destructive: if you only want to select a hyperlink (for copying) and this problem occurs, the link and its text completely disappear from the document.
It can be undone with an Undo, which suggests that under the hood a different or an extra command is executed other than simply selecting.

Windows 7 64-bit
LibreOffice (Writer) 4.3.5.2
Comment 4 Björn Michaelsen 2016-08-09 13:49:54 UTC
Reproduction scenario:
1/ create new writer document
2/ press dt<F3> to create a dead text
3/ select first letter from right-to-left and press the Insert Hyperlink toolbar button

Expected Behavior:
Insert Link Dialog pops up with selected text prefilled in the "Text" field.

Just tested on LibreOffice 5.1.4 on Linux and Im seeing the expected behavior. This needs a better reproduction scenario. => NEEDINFO
Comment 5 Timur 2016-08-10 11:49:36 UTC
Reproduction scenario in Writer document:
1. write some text like Aa
2. select that text and insert hyperlink (with Hyperlink toolbar button or Format-Character-Hyperlink)
3. select just text Aa from right-to-left (with mouse or keyboard) and right-click Edit Hyperlink...
4. note that text is empty and there should be "Aa"
5. Change URL and click OK (there's Bug 91832 with Apply)
5. note that Aa is gone and full hyperlink is shown

Expected: text Aa is still there after hyperlink change

Note: seems there's another bug here: when hyperlinked text is selected, Format-Character-Hyperlink doesn't show URL.
Comment 6 Timur 2016-08-10 11:52:33 UTC Comment hidden (obsolete, spam)
Comment 7 Timur 2016-08-10 12:23:26 UTC Comment hidden (obsolete, spam)
Comment 8 Timur 2017-01-09 09:31:47 UTC
Repro with 5.2.0 but not reproduced anymore in 5.2.4, so I close as WFM. 
Feel free to reopen if proved otherwise.
Comment 9 Yousuf Philips (jay) (retired) 2017-01-12 10:23:04 UTC
Confirmed fixed, though the fix of the cursor jumping to the end of the hyperlink text isnt a really nice fix. :D

Version: 5.3.0.1.0+
Build ID: d1b8074ffe4b945a41e3ad9e1fb43332d78d73fb
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; VCL: gtk2; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-3, Time: 2017-01-10_23:02:10
Locale: en-US (en_US.UTF-8); Calc: group