TextArea, TextPane and EditorPane: no longer select all text when component is focused for the first time (issue #498; regression in FlatLaf 2.0)

This commit is contained in:
Karl Tauber
2022-03-17 12:21:06 +01:00
parent d487c3b005
commit 53f2730064
2 changed files with 3 additions and 1 deletions

View File

@@ -19,6 +19,8 @@ FlatLaf Change Log
- PasswordField: Fixed reveal button appearance in IntelliJ themes. (issue #494) - PasswordField: Fixed reveal button appearance in IntelliJ themes. (issue #494)
- ScrollBar: Center and scale arrows in scroll up/down buttons (if shown). - ScrollBar: Center and scale arrows in scroll up/down buttons (if shown).
(issue #493) (issue #493)
- TextArea, TextPane and EditorPane: No longer select all text when component is
focused for the first time. (issue #498; regression in FlatLaf 2.0)
#### Incompatibilities #### Incompatibilities

View File

@@ -236,7 +236,7 @@ public class FlatCaret
if( selectAllOnFocusPolicy == null ) if( selectAllOnFocusPolicy == null )
selectAllOnFocusPolicy = this.selectAllOnFocusPolicy; selectAllOnFocusPolicy = this.selectAllOnFocusPolicy;
if( SELECT_ALL_ON_FOCUS_POLICY_NEVER.equals( selectAllOnFocusPolicy ) ) if( selectAllOnFocusPolicy == null || SELECT_ALL_ON_FOCUS_POLICY_NEVER.equals( selectAllOnFocusPolicy ) )
return; return;
if( !SELECT_ALL_ON_FOCUS_POLICY_ALWAYS.equals( selectAllOnFocusPolicy ) ) { if( !SELECT_ALL_ON_FOCUS_POLICY_ALWAYS.equals( selectAllOnFocusPolicy ) ) {