Modify

Opened 10 years ago

Closed 8 years ago

#5117 closed defect (fixed)

Do not select text in Autocomplete before users enters edit mode

Reported by: stoecker Owned by: team
Priority: normal Milestone:
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 10 years ago by bastiK

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).

comment:2 Changed 10 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 8 years 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 Changed 8 years 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 ; Changed 8 years 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 ; Changed 8 years 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 8 years 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 8 years ago by xeen

Resolution: fixed
Status: newclosed

In 4948/josm:

fix #5117 – the selection buffer (middle mouse paste) on *nix systems shouldn’t be overwritten anymore by the search oder add/edit properties dialog. Please reopen the ticket, if there are any more occurences.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.