Changeset 13170 in josm


Ignore:
Timestamp:
2017-11-26T14:31:59+01:00 (3 weeks ago)
Author:
Don-vip
Message:

see #13747 - fix focus/selection issues in presets dialogs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java

    r12859 r13170  
    130130        addFocusListener(
    131131                new FocusAdapter() {
    132                     @Override public void focusGained(FocusEvent e) {
    133                         selectAll();
     132                    @Override
     133                    public void focusGained(FocusEvent e) {
     134                        if (e != null && e.getOppositeComponent() != null) {
     135                            // Select all characters when the change of focus occurs inside JOSM only.
     136                            // When switching from another application, it is annoying, see #13747
     137                            selectAll();
     138                        }
    134139                        applyFilter(getText());
    135140                    }
     
    139144        addKeyListener(
    140145                new KeyAdapter() {
    141 
    142146                    @Override
    143147                    public void keyReleased(KeyEvent e) {
Note: See TracChangeset for help on using the changeset viewer.