changeset 10815:3d5c22069d1f

8165459: HTMLEditor: clipboard toolbar buttons are disabled unexpectedly Reviewed-by: aghaisas, mbilla
author rkamath
date Tue, 23 Jan 2018 15:33:25 +0530
parents ed5f1fe60f02
children f09aa59ddcca
files modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java	Tue Jan 23 11:54:33 2018 +0530
+++ b/modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java	Tue Jan 23 15:33:25 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -352,7 +352,11 @@
                     resetToolbarState = false;
                 } else if (event.isShiftDown() &&
                         (event.getCode() == KeyCode.UP || event.getCode() == KeyCode.DOWN ||
-                                event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT)) {
+                         event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT ||
+                         event.getCode() == KeyCode.HOME || event.getCode() == KeyCode.END)) {
+                    updateToolbarState(true);
+                } else if ((event.isControlDown() || event.isMetaDown()) &&
+                            event.getCode() == KeyCode.A) {
                     updateToolbarState(true);
                 }
             });