MacViews: Accelerator handling is done after View::OnKeyPressed. |
|||
Issue descriptionChrome Version: 55.0.2883.95 OS: Mac On MacViews, accelerator handling is being done after View::OnKeyPressed on the focused view, while the reverse is true on Windows and Linux. This can potentially lead to subtle bugs.
,
Apr 12 2017
,
Sep 14 2017
Ctrl+Enter does not work in find_bar_view due to this issue on MacViews. Is the order can be changed on MacViews ?
,
Sep 15 2017
I think we can change the order in BridgedNativeWidget::DispatchKeyEventPostIME() so that FocusManager::OnKeyEvent() called ahead of Widget::OnKeyEvent(). Which one will be better? Changing BridgedNativeWidget::DispatchKeyEventPostIME() to match the order to other platforms or changing FindBarView::HandleKeyEvent() to fix just the Ctrl+Enter action ?
,
Sep 15 2017
swapping in BridgedNativeWidget::DispatchKeyEventPostIME() sgtm. ideally, this needs a cross-platform test that verifies the order on aura and mac is the same.
(some explanation of how the path happens in Aura would be good too - it's complicated :/
E.g.,
"In aura FocusManager::OnKeyEvent() is called via {something - is it WindowEventDispatcher::PreDispatchKeyEvent()? } which happens before the call to Widget::OnKeyEvent() is invoked via EventDispatcher::DispatchEvent()."
,
Sep 18 2017
In Aura, FocusManager::OnKeyEvent() is called 3 times before View::OnKeyEvent() and 1 times after View::OnKeyEvent(). 3 times before View::OnKeyEvent() comes from EventDispatcher::ProcessEvent(), where DispatchEventToEventHandlers() is called 2 times, and DispatchEvent() is called 1 time. Aura uses WindowEventDispacher in WindowTreeHost::DispatchKeyEventPostIME() while MacViews uses Widget::OnKeyEvent() in BridgedNativeWidget::DispatchKeyEventPostIME().
,
Sep 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ad6955df7d777df5951ff9e55db6f0ffcd4751f0 commit ad6955df7d777df5951ff9e55db6f0ffcd4751f0 Author: jongkwon.lee <jongkwon.lee@navercorp.com> Date: Thu Sep 21 06:27:41 2017 MacViews: Change the order of OnKeyEvent() in DispatchKeyEventPostIME() In Aura, FocusManager::OnKeyEvent() is called before View::OnKeyEvent(). This makes accelerator handling occur before View's OnKeyPressed() handling. This patch makes the same order in MacViews and fixes FindInPageTest.CtrlEnter. Bug: 679522 Test: interactive_ui_tests FindInPageTest.CtrlEnter Change-Id: I68d611d7978bfd6e590e957fe2d8c30c117a7944 Reviewed-on: https://chromium-review.googlesource.com/670764 Reviewed-by: Trent Apted <tapted@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#503368} [modify] https://crrev.com/ad6955df7d777df5951ff9e55db6f0ffcd4751f0/ui/views/cocoa/bridged_native_widget.mm
,
Sep 22 2017
FindInPageTest.CtrlEnter passing in https://uberchromegw.corp.google.com/i/chromium.fyi/builders/Chromium%20Mac%2010.10%20MacViews/builds/27735 \o/ Thanks! |
|||
►
Sign in to add a comment |
|||
Comment 1 by tapted@chromium.org
, Jan 25 2017