changeset 10836:b86ce9469653

8089454: [HTMLEditor] selection removes CENTER alignment Reviewed-by: mbilla, ghb
author rkamath
date Thu, 15 Feb 2018 13:45:49 +0530
parents 3838fa49ebbb
children aa60e507985e
files modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java	Tue Feb 13 22:21:05 2018 +0530
+++ b/modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java	Thu Feb 15 13:45:49 2018 +0530
@@ -927,7 +927,8 @@
             }
         }
 
-        if (alignmentToggleGroup.getSelectedToggle() == null) {
+        if (alignmentToggleGroup.getSelectedToggle() == null
+                && webPage.getClientSelectedText().isEmpty()) {
             alignmentToggleGroup.selectToggle(alignLeftButton);
         }