New issue
Advanced search Search tips

Issue 617110 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

MacViewsBrowser: Text insertion takes place even with an active menu

Project Member Reported by karandeepb@chromium.org, Jun 3 2016

Issue description

Version: 53.0.2755.0
OS: Mac

What steps will reproduce the problem?
(1) Build with mac_views_browser=1.
(2) Select omnibox.
(3) Click App menu button on address bar.
(4) Press 'p'

What is the expected output?
Print dialog should open.

What do you see instead?
Print dialog opens and p is entered in the omnibox. 

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5c38e137d2b39cc17c828ddfb783e1842e7dd76f

commit 5c38e137d2b39cc17c828ddfb783e1842e7dd76f
Author: karandeepb <karandeepb@chromium.org>
Date: Tue Jun 21 07:52:39 2016

MacViews: Modify insertText handlers to correctly handle space key and simplify menu event dispatch.

Currently, Space key events are not being passed down the view hierarchy, since
no ui::KeyEvent is being generated for them. This CL modifies insertText: to
generate a synthetic ui::KeyEvent for character events. This allows us to
correctly handle the space (and possibly other) keys. Since we no longer call
insertText:replacementRange: from insertText:,  crbug.com/617110  is also fixed.

Also, this CL removes all menu event handling from insertText:replacementRange:
since it is only invoked in case of a valid inputContext. Also, this CL adds
keyUp: to BridgedContentView, so that key-up events are passed to the Views
hierarchy.

Also checked that this causes no views_unittests regressions and that
enabled interactive_ui_tests in:
-menu_controller_interactive_uitest.cc
-menu_item_view_interactive_uitest.cc
-menu_model_adapter_test.cc
-menu_view_drag_and_drop_test.cc
still work correctly.

BUG= 607429 ,  617110 

Review-Url: https://codereview.chromium.org/2033433006
Cr-Commit-Position: refs/heads/master@{#400918}

[modify] https://crrev.com/5c38e137d2b39cc17c828ddfb783e1842e7dd76f/ui/views/cocoa/bridged_content_view.h
[modify] https://crrev.com/5c38e137d2b39cc17c828ddfb783e1842e7dd76f/ui/views/cocoa/bridged_content_view.mm
[modify] https://crrev.com/5c38e137d2b39cc17c828ddfb783e1842e7dd76f/ui/views/controls/button/custom_button_unittest.cc
[modify] https://crrev.com/5c38e137d2b39cc17c828ddfb783e1842e7dd76f/ui/views/controls/menu/menu_controller.cc
[modify] https://crrev.com/5c38e137d2b39cc17c828ddfb783e1842e7dd76f/ui/views/controls/menu/menu_controller.h
[modify] https://crrev.com/5c38e137d2b39cc17c828ddfb783e1842e7dd76f/ui/views/controls/menu/menu_key_event_handler.cc

Status: Fixed (was: Assigned)

Sign in to add a comment