Skip to content

Commit 89084da

Browse files
hansonrhansonr
authored andcommitted
JTextComponent to set focus only when appropriate
1 parent f0b6655 commit 89084da

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/TextListener.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,11 @@ public void changedUpdate(DocumentEvent e) {
191191
ui.setJSText();
192192
int p = e.getOffset() + e.getLength();
193193
ui.setJavaMarkAndDot(new Point(p, p));
194-
if (c != null)
195-
SwingUtilities.invokeLater(() -> {
196-
c.requestFocus();
197-
});
194+
// but this sets the focus even if it is just having its text changed. Tracker Model Builder issue
195+
// if (c != null)
196+
// SwingUtilities.invokeLater(() -> {
197+
// c.requestFocus();
198+
// });
198199
}
199200
}
200201

0 commit comments

Comments
 (0)