title: JavaFx: Method selectAll() just works by focus with keyboard
body: <p>i use selectionAll() to select the whole text in my textfield but it just works when the focus comes from keyboard (like Tab). </p>
  
  <p>If i click with my mouse in the textfield, it selects the text just for a very short moment. But it has to work like with the focus which comes from the keyboard. </p>
  
  <pre class="lang-java prettyprint-override"><code>flaschenPreis.focusedProperty().addListener(new ChangeListener&lt;Boolean&gt;() {
      public void changed(ObservableValue ov, Boolean t, Boolean t1) {
  
          if ( flaschenPreis.isFocused() &amp;&amp; !flaschenPreis.getText().isEmpty()) {
              flaschenPreis.selectAll();
          }              
      }
  });
  
  
  literPreis.focusedProperty().addListener(new ChangeListener() {
      public void changed(ObservableValue ov, Object t, Object t1) {
  
          if (literPreis.isFocused() &amp;&amp; !literPreis.getText().isEmpty()) {
              literPreis.selectAll();
          }
      }
  });
  </code></pre>
  
  <p>flaschenPreis und literPreis are my textfields</p>