Opened 6 years ago
Last modified 5 years 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 6 years ago by
Keywords: | focus added |
---|
comment:2 Changed 6 years ago by
comment:3 Changed 6 years ago by
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 5 years ago by
Summary: | [patch] Tag Editor default focus is not set or not respected → Tag 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... :(
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.