Opened 3 years ago
Closed 16 months ago
#5117 closed defect (fixed)
Do not select text in Autocomplete before users enters edit mode
| Reported by: | stoecker | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Component: | Core |
| Version: | Keywords: | ||
| Cc: | bastiK, stoecker |
Description (last modified by skyper)
Currently autocomplete combo box always kills clipboard, as the text is preselected upon opening the dialogs. The text should only be selected in case real edit mode is started.
Does not happen for autocomplete text box.
Attachments (0)
Change History (8)
comment:1 Changed 3 years ago by bastiK
comment:2 Changed 3 years ago by stoecker
Most disturbing ones:
- search field in search dialog
- dialog to download URL
Ctrl-C, Ctrl-V is not the same as Middle click. Disabling middle click kills the Unix way of copy/paste. I have a select history for most desktops, but it is disturbing to paste, detect that I pasted the current content again, reselect and paste again.
Probably the box should be unselected always and only a special behaviour added for the two exceptions you mentioned (tags dialogs).
comment:3 Changed 17 months ago by skyper
- Description modified (diff)
+10
There are different kinds of selecting/highlighting. I came across many programs which make a difference between the manual keyboard/mouse selecting and the initial selection of such entries.
comment:4 follow-up: ↓ 5 Changed 16 months ago by xeen
- Cc stoecker added
I have a patch for the search dialog and add/edit properties. It works by storing the selection buffer, selecting, restoring selection buffer. In other words, something like this:
Clipboard sysSel = Toolkit.getDefaultToolkit().getSystemSelection();
if(sysSel != null) {
Transferable old = sysSel.getContents(null);
// old selection code
sysSel.setContents(old, null);
} else {
// old selection code
}
It works quite nicely, but unfortunately has to be applied everywhere where the selection made should not end up in the selection buffer.
Which “download URL” dialog are you referring to? I’ll include it before committing.
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 16 months ago by stoecker
Replying to xeen:
Which “download URL” dialog are you referring to? I’ll include it before committing.
Open URL in file menu.
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 16 months ago by xeen
Open URL in file menu.
I guess you mean “Open Location…”. It doesn’t select any text by default, keeping my paste buffer intact. If you meant “losing paste buffer when selecting from drop down”, then it is already fixed with the existing changes.
comment:7 in reply to: ↑ 6 Changed 16 months ago by stoecker
Replying to xeen:
Open URL in file menu.
I guess you mean “Open Location…”. It doesn’t select any text by default, keeping my paste buffer intact. If you meant “losing paste buffer when selecting from drop down”, then it is already fixed with the existing changes.
Yes, this is fixed with the drop-down box. In the past it was a simple text field.
comment:8 Changed 16 months ago by xeen
- Resolution set to fixed
- Status changed from new to closed
In 4948/josm:



What dialogs are you referring to?
Are you talking about middle mouse button clipboard? You can always use Ctrl-C, Ctrl-V.
For tag edit dialog this has the advantage that you can start typing immediately without having to click into the edit area. For tag add dialog one could probably keep the key field empty (but focused).