< prev index next >

modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxPopupControl.java

Print this page
rev 9045 : [mq]: 8136838

*** 24,34 **** */ package com.sun.javafx.scene.control.skin; import javafx.beans.value.ObservableValue; - import javafx.css.PseudoClass; import javafx.css.Styleable; import javafx.geometry.*; import javafx.scene.control.*; import com.sun.javafx.scene.control.behavior.ComboBoxBaseBehavior; import com.sun.javafx.scene.input.ExtendedInputMethodRequests; --- 24,33 ----
*** 75,84 **** --- 74,88 ---- // move fake focus in to the textfield if the comboBox is editable comboBoxBase.focusedProperty().addListener((ov, t, hasFocus) -> { if (getEditor() != null) { // Fix for the regression noted in a comment in RT-29885. ((FakeFocusTextField)textField).setFakeFocus(hasFocus); + + // JDK-8120120 (aka RT-21454) and JDK-8136838 + if (!hasFocus) { + setTextFromTextFieldIntoComboBoxValue(); + } } }); comboBoxBase.addEventFilter(KeyEvent.ANY, ke -> { if (textField == null || getEditor() == null) {
*** 546,553 **** * * * Stylesheet Handling * * * **************************************************************************/ - private static PseudoClass CONTAINS_FOCUS_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("contains-focus"); - } --- 550,555 ----
< prev index next >