Chromium Code Reviews
DescriptionFix behavior of clipboard commands when there is unfocused selection
User-triggered clipboard commands should be disabled when selection
doesn't have focus. Hence, this patch checks whether selection has
focus in EnabledCopy/Cut/Paste.
However, this is a quirk that allows clipboard commands to run even
their enabled functions return false, so that clipboard events are
still fired regardless of the enabled state. To work with this quirk,
this patch also checks whether selection has focus in
Editor::Copy/Cut/Paste/PasteAsPlainText, and if not, stops the command.
BUG=722925
TEST=editing/pasteboard/pasteboard_with_unfocused_selection.html
Review-Url: https://codereview.chromium.org/2894473003
Cr-Commit-Position: refs/heads/master@{#472985}
Committed: https://chromium.googlesource.com/chromium/src/+/f8ff4f535ca35569ff840d9ffb71bb3e9e5d3ee1
Patch Set 1 #Patch Set 2 : Wed May 17 15:59:09 PDT 2017 #Patch Set 3 : Fix UnsafeSVGAttributeSanitizationTest #
Messages
Total messages: 28 (19 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||