Modify

Opened 2 years ago

Last modified 13 months ago

#14835 new defect

Tag Editor default focus is not set or not respected

Reported by: AndrewBuck Owned by: team
Priority: normal Milestone:
Component: Plugin tageditor Version: tested
Keywords: focus Cc:

Description

When you press T to open the tag editor plugin window it used to be the case that the keyboard focus was set to the first key in the key-value table. This meant you could simply press T and start typing the key of the tag you wanted to add to a new object.

Some time back this was either changed, or simply stopped working. Now when you open the editor the focus appears to be in the upper box where the presets are, meaning you have to use the mouse to click into the key-value table before you can start editing.

Although it is a rather small extra step, in a long editing session this gets very annoying after doing it hundreds of times.

Attachments (0)

Change History (5)

comment:1 Changed 2 years ago by Don-vip

Keywords: focus added

comment:2 Changed 2 years ago by AndrewBuck

I did a bit of googling and looked at the code and I think I know what to do to fix this, although unfortunately I don't have a build environment set up to test this.

I think that all that needs to be done is add a single line after the following line...

https://github.com/openstreetmap/josm-plugins/blob/master/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditor.java#L195

After that line all it should need is...

tblTagEditor.editCellAt(0, 0);

I think that should do the trick. To test if it works, just pop open the tag editor and if you can immediately start typing in that cell without clicking on it then it is working correctly.

comment:3 Changed 2 years ago by Klumbumbus

Summary: Tag Editor default focus is not set or not respected[patch] Tag Editor default focus is not set or not respected

comment:4 Changed 13 months ago by Don-vip

Summary: [patch] Tag Editor default focus is not set or not respectedTag Editor default focus is not set or not respected

The patch does not work, it is more complicated than that. Looks like a race condition. In debug, it works... :(

comment:5 Changed 13 months ago by Don-vip

In 13726/josm:

see #14835 - log a warning message when focus cannot be set

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to AndrewBuck
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.