DescriptionMacViews: Handle Tab properly
On Mac, interpreting a tab keypress into an action message calls
[NSResponder insertTab]. [RenderWidgetHostViewCocoa
doCommandBySelector:] has for a long time had a check that skips
converting any action message whose selector starts with "insert" into
an editing command, and just treats it as a regular keypress instead.
This approach also works well for UI in MacViews, so do the same.
Theoretically a user could remap a different key or key combination to
the 'insertTab' action message, but that's unlikely.
Updates TextfieldTest.FocusTraversalTest with cross-platform checks to
test for this case. Also tested manually with views_examples.
For the test to work with the approach in this CL, the event simulator
needs to provide an answer for -[NSApplication currentEvent], so that's
done too.
BUG=454353
Committed: https://crrev.com/f8a2ca3720d41d2bf03b2e68f483d5edd28d8af6
Cr-Commit-Position: refs/heads/master@{#318172}
Patch Set 1 #Patch Set 2 : add test #Patch Set 3 : Still need insertTexT: #
Total comments: 1
Messages
Total messages: 13 (4 generated)
|