Description: When I have selected a string as a hypertext link and do either ctrl-k or Insert/Hyperlink the URL is immediately filled in with whatever shit that happens to be on top of my clipboard. I think this is rather a bug than a feature .... Steps to Reproduce: 1.write and select "text" 2.clic ctrl-k 3.look at URL in the pop-up Actual Results: The URL contains shit from the clipboard Expected Results: A clean URL Reproducible: Always User Profile Reset: No Additional Info: This is what I got with the new Ubuntu LTS 22 -> 24 upgrade
I see advantages in current behavior. If I copy a link from a web page to paste it into a document, the link is in the right place without the need to paste. If I want to enter a link by hand instead, that's no problem either. Because the entry is already selected, I can start writing directly without having to click into the input line. I do not want this behavior to be changed.
The problem becomes obvious when trying to make an intradocument link to a bookmark.
(In reply to Ola Smith from comment #2) > The problem becomes obvious when trying to make an intradocument link to a > bookmark. I agree, that could be improved. When you press Ctrl+K and then in that dialog click on "Document", then field "Path" has to be empty as default, because the to be used document is the current document in most cases. But for the option "Internet" the solution from bug 146576 should be kept. My suggestion would be to use the clipboard content only as default for the options "Internet" and "Mail" and leave the field blank in the "Document" and "New Document" case. The option "Document" has the button "Open File" and the option "New Document" has the button "Select Path" to generate a proper entry in the "Path" or "File" field, respectively. For them a clipboard content as default is not helpful.
There is yet another problem: If I ctrl-k an existing link, the original URL will be lost and replaced with whatever there is in the clipboard. Annoying!
(In reply to Ola Smith from comment #4) > There is yet another problem: > > If I ctrl-k an existing link, the original URL will be lost and replaced > with whatever there is in the clipboard. > > Annoying! Use "Edit Hyperlink" (.uno:EditHyperlink) from the context menu of the hyperlink. It has no default short cut.
I think, we need a UX decision about the behavior of the Hyperlink-dialog. Known problems are: If Ctrl-K is used on a existing hyperlink, it sets the current clipboard content into the URL in Writer, but not in Calc. When a cell in Calc contains only a hyperlink, then Ctrl+Click on the cell executes the hyperlink and Ctrl+K opens the hyperlink dialog. But command .uno:EditHyperlink does not work and "Edit Hyperlink" is not available from the context menu of the cell. Similar in Impress, when the mouse hovers over textual hyperlink, then Ctrl+Click executes the hyperlink and Ctrl+K opens it but looses the URL. Command .uno:EditHyperlink does not work. When the user switches from "Internet" to "Document" in the Hyperlink dialog, an existing URL entry is used as Path. Also other workflow produce wrong Path entry, see bug 159722. The use case "Document" has more problems: bug 90679 and bug 158439 A search for "hyperlink dialog" in Bugzilla including "Wontfix" and "Duplicate" shows that users have problems with this dialog.
1. Use the clipboard content to preset a target only if it is syntactically a valid hyperlink target. Don't preset from the clipboard, if this is syntactically no hyperlink target. 2. Preset at most once after the current instance of the dialog is invoked. 3. Don't preset it, if the dialog is invoked for an existing hyperlink: then come up as if this is what might be edited/altered by the user. If this would have been done in the duplicates #146576 and #159722, all would beclome happy.
(In reply to Regina Henschel from comment #6) > When a cell in Calc contains only a hyperlink, then Ctrl+Click on the cell > executes the hyperlink and Ctrl+K opens the hyperlink dialog. But command > .uno:EditHyperlink does not work and "Edit Hyperlink" is not available from > the context menu of the cell. Aren't these questions different from whether the dialog accepts clipboard content? I vaguely remember a ticket/patch about link execution. (In reply to Adalbert Hanßen from comment #7) > 1. Use the clipboard content to preset a target only if it is syntactically > a valid hyperlink target. Don't preset from the clipboard, if this is > syntactically no hyperlink target. +1 > 2. Preset at most once after the current instance of the dialog is invoked. This might be tricky. And also hard to understand by users. > 3. Don't preset it, if the dialog is invoked for an existing hyperlink: then > come up as if this is what might be edited/altered by the user. +1 > If this would have been done in the duplicates #146576 and #159722, all > would beclome happy. Rather make this ticket a duplicate then.