Bug 101463 - insert HyperLink fails for selections longer than 255 chars
Summary: insert HyperLink fails for selections longer than 255 chars
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 127870 (view as bug list)
Depends on:
Blocks: Hyperlink-Dialog
  Show dependency treegraph
 
Reported: 2016-08-12 11:25 UTC by Björn Michaelsen
Modified: 2023-01-05 12:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2016-08-12 11:25:05 UTC
Steps to reproduce:
1/ create new writer document
2/ type dt<F3> to create a long dead text
3/ select the whole paragraph
4/ use "insert Hyperlink" toolbar button
5/ type "example.com" in the URL field and close the dialog by pressing "OK"

Expected behaviour:
The paragraph becomes a link to example.com, the content of the paragraph stays unchanged.

Actual behaviour:
The paragraph becomes a link to example.com, the content of the paragraph is shortened to 255 chars.

IMHO the "Further Settings"->"Text" field in the dialog should be removed from the dialog, and the "Ok"/"Apply" buttons should just use the selection instead of replacing the content. If done so, the "Insert Hyperlink" button/menu entry needs to be disable if there is no selection in the document.

Note this would kill the old-style modal-only workflow of:
- click "insert Hyperlink" without a selection
- fill the text in the dialog
- click "Ok" and have _new_ content added as link

I think the "select content in document, then use the dialog to linkify" workflow is a superior replacement anyway. Still, would like UX input on this => needUXeval
Comment 1 Heiko Tietze 2017-01-02 14:52:02 UTC
The bug results from automatically adding selected text. If you manually enter the dummy text into the 'text' field under 'further settings' you get the whole paragraph underlined (-> WFM). 

Discussions of URL limits like in http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers or http://stackoverflow.com/questions/29458445/what-is-a-safe-maximum-length-a-segment-in-a-url-path-should-be point to a de facto limit of 2000 characters - but that's only relevant for the URI part. All between <a href=[URI]>any text</a> is free.

The second and more UX-related aspect of this ticket about redesigning the (hyper-)link dialog should be discussed separately. If we remove the additional features we loose much of the html editing capabilities (not that bad, IMHO).

Removing UX since it's an ordinary bug and setting to NEW.
Comment 2 QA Administrators 2018-09-07 02:44:12 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2020-09-07 03:52:43 UTC Comment hidden (obsolete)
Comment 4 Gabor Kelemen (allotropia) 2021-01-04 18:52:40 UTC
*** Bug 127870 has been marked as a duplicate of this bug. ***
Comment 5 QA Administrators 2023-01-05 03:20:16 UTC Comment hidden (obsolete)
Comment 6 David Gerard 2023-01-05 12:34:23 UTC
I also reported this issue as bug 127870 - I just tested this in latest git master:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 00b62877fa2f900d1c2dcf7b721f7a956408f8a0
CPU threads: 12; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

- and the bug appears to have been fixed!

Changing status to RESOLVED - WORKSFORME