Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/script-tests/enabling-and-selection-2.js

Issue 2886983002: Make EnabledVisibleSelection return false for user-triggered command and unfocused selection (Closed)
Patch Set: Tue May 16 19:43:47 PDT 2017 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_with_unfocused_selection.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/execCommand/script-tests/enabling-and-selection-2.js
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/enabling-and-selection-2.js b/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/enabling-and-selection-2.js
index b27deb810650072fa5c7545b9d8c7ad6b29135a4..acc2e9961b872c136587559a32a2c1cd0877a3d1 100644
--- a/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/enabling-and-selection-2.js
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/script-tests/enabling-and-selection-2.js
@@ -18,6 +18,8 @@ function enabled(command, element, selectionStart, selectionEnd)
{
var selection = document.getSelection();
selection.removeAllRanges();
+ if (document.activeElement)
+ document.activeElement.blur();
if (element) {
var range = document.createRange();
range.setStart(element.firstChild, selectionStart);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_with_unfocused_selection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698