|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by dpapad Modified:
4 years, 1 month ago CC:
chromium-reviews, dbeam+watch-elements_chromium.org, michaelpg+watch-elements_chromium.org, oshima+watch_chromium.org, stevenjb+watch-md-settings_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionWebUI: Return focus to anchor element when cr-action-menu is closed.
The default <dialog> restore focus behavior is not very intuitive (or clear)
and certainly does not match the user's expectation when an action menu is
closed. Action menu should define its own behavior that matches user's focus
expectations, instead of just relying on <dialog>'s behavior.
BUG=659567
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Committed: https://crrev.com/140f168199593fafe11b6a568cdfa99b4d1c9bda
Cr-Commit-Position: refs/heads/master@{#429468}
Patch Set 1 #Patch Set 2 : Add test. #Patch Set 3 : Fix closure #Patch Set 4 : Rebase #Patch Set 5 : Remove dangling reference. #Patch Set 6 : Resolve conflicts. #
Messages
Total messages: 36 (23 generated)
Description was changed from ========== MD Settings: Return focus to anchor element when cr-action-menu is closed. BUG=659567 ========== to ========== MD Settings: Return focus to anchor element when cr-action-menu is closed. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
Description was changed from ========== MD Settings: Return focus to anchor element when cr-action-menu is closed. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== WebUI: Return focus to anchor element when cr-action-menu is closed. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was checked by dpapad@chromium.org to run a CQ dry run
The CQ bit was checked by dpapad@chromium.org to run a CQ dry run
Patchset #2 (id:20001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #2 (id:40001) has been deleted
The CQ bit was checked by dpapad@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== WebUI: Return focus to anchor element when cr-action-menu is closed. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== WebUI: Return focus to anchor element when cr-action-menu is closed. The default <dialog> restore focus behavior is not very intuitive (or clear) and certainly does not match the user's expectation when an action menu is closed. Action menu should define its own restore on focus behavior, instead of just relying on <dialog>'s behavior. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: closure_compilation on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/closure_compila...)
The CQ bit was checked by dpapad@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== WebUI: Return focus to anchor element when cr-action-menu is closed. The default <dialog> restore focus behavior is not very intuitive (or clear) and certainly does not match the user's expectation when an action menu is closed. Action menu should define its own restore on focus behavior, instead of just relying on <dialog>'s behavior. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== WebUI: Return focus to anchor element when cr-action-menu is closed. The default <dialog> restore focus behavior is not very intuitive (or clear) and certainly does not match the user's expectation when an action menu is closed. Action menu should define its own restore that matches user's focus expectations on focus behavior, instead of just relying on <dialog>'s behavior. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
dpapad@chromium.org changed reviewers: + dbeam@chromium.org, michaelpg@chromium.org
@dbeam, @michaelpg: I think this makes much more sense from the user's perspective. See https://bugs.chromium.org/p/chromium/issues/detail?id=659567#c8 for a screencast.
On 2016/11/01 16:52:22, dpapad wrote: > @dbeam, @michaelpg: I think this makes much more sense from the user's > perspective. See https://bugs.chromium.org/p/chromium/issues/detail?id=659567#c8 > for a screencast. How does this work when the anchor element is removed from the DOM? Example in chrome://md-settings/languages: Removing an item in the middle of the list: A1. Add French and German, with French above German. A2. Tap action menu for French. Choose Remove. Expected: ? Removing an item at the end of the list: B1. Add French and German, with French above German. B2. Tap action menu for German. Choose Remove. Expected: ? Also worth testing with an <iron-list> (which languages isn't).
On 2016/11/01 at 19:46:21, michaelpg wrote: > On 2016/11/01 16:52:22, dpapad wrote: > > @dbeam, @michaelpg: I think this makes much more sense from the user's > > perspective. See https://bugs.chromium.org/p/chromium/issues/detail?id=659567#c8 > > for a screencast. > > How does this work when the anchor element is removed from the DOM? Example in chrome://md-settings/languages: > > Removing an item in the middle of the list: > A1. Add French and German, with French above German. > A2. Tap action menu for French. Choose Remove. > > Expected: ? Focus moves to the next item, in this case would be the '...' next to German. > > Removing an item at the end of the list: > B1. Add French and German, with French above German. > B2. Tap action menu for German. Choose Remove. > > Expected: ? Nothing is focused. Hitting tab goes to the 1st item after the list, shift+tab goes to the newly last '...' icon. > > Also worth testing with an <iron-list> (which languages isn't). Tried with search engines iron-list. Same behavior as above.
On 2016/11/01 20:45:57, dpapad wrote: > On 2016/11/01 at 19:46:21, michaelpg wrote: > > On 2016/11/01 16:52:22, dpapad wrote: > > > @dbeam, @michaelpg: I think this makes much more sense from the user's > > > perspective. See > https://bugs.chromium.org/p/chromium/issues/detail?id=659567#c8 > > > for a screencast. > > > > How does this work when the anchor element is removed from the DOM? Example in > chrome://md-settings/languages: > > > > Removing an item in the middle of the list: > > A1. Add French and German, with French above German. > > A2. Tap action menu for French. Choose Remove. > > > > Expected: ? > Focus moves to the next item, in this case would be the '...' next to German. > > > > > > Removing an item at the end of the list: > > B1. Add French and German, with French above German. > > B2. Tap action menu for German. Choose Remove. > > > > Expected: ? > Nothing is focused. Hitting tab goes to the 1st item after the list, shift+tab > goes to the newly last '...' icon. OK, that's what I was checking. I guess that's what happens when you call focus() on an element that is no longer in the DOM, right? So it's okay that anchorElement_ is now a "dangling" element (not in the dom). > > > > > > Also worth testing with an <iron-list> (which languages isn't). > Tried with search engines iron-list. Same behavior as above.
> OK, that's what I was checking. I guess that's what happens when you call focus() on an element that is no longer in the DOM, right? So it's okay that anchorElement_ is now a "dangling" element (not in the dom). Added a statement to set anchorElement_ back to null. It is always being initialized in showAt() so there was no reason to keep the reference alive after close().
On 2016/11/01 at 21:38:13, dpapad wrote: > > OK, that's what I was checking. I guess that's what happens when you call focus() on an element that is no longer in the DOM, right? So it's okay that anchorElement_ is now a "dangling" element (not in the dom). > > Added a statement to set anchorElement_ back to null. It is always being initialized in showAt() so there was no reason to keep the reference alive after close(). And yes, I think the observed behavior happens because the call to focus() the element not in the DOM is ignored.
lgtm
Description was changed from ========== WebUI: Return focus to anchor element when cr-action-menu is closed. The default <dialog> restore focus behavior is not very intuitive (or clear) and certainly does not match the user's expectation when an action menu is closed. Action menu should define its own restore that matches user's focus expectations on focus behavior, instead of just relying on <dialog>'s behavior. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== WebUI: Return focus to anchor element when cr-action-menu is closed. The default <dialog> restore focus behavior is not very intuitive (or clear) and certainly does not match the user's expectation when an action menu is closed. Action menu should define its own behavior that matches user's focus expectations, instead of just relying on <dialog>'s behavior. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
lgtm 2
On 2016/11/01 at 23:17:15, michaelpg wrote: > lgtm 2 Thanks. I have to wait for the parent CL https://codereview.chromium.org/2461113002 to land before landing this though.
On 2016/11/01 23:43:33, dpapad wrote: > On 2016/11/01 at 23:17:15, michaelpg wrote: > > lgtm 2 > > Thanks. I have to wait for the parent CL > https://codereview.chromium.org/2461113002 to land before landing this though. that's fine. just sayin, since I was a reviewer.
Patchset #6 (id:140001) has been deleted
The CQ bit was checked by dpapad@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dbeam@chromium.org, michaelpg@chromium.org Link to the patchset: https://codereview.chromium.org/2464873003/#ps160001 (title: "Resolve conflicts.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #6 (id:160001)
Message was sent while issue was closed.
Description was changed from ========== WebUI: Return focus to anchor element when cr-action-menu is closed. The default <dialog> restore focus behavior is not very intuitive (or clear) and certainly does not match the user's expectation when an action menu is closed. Action menu should define its own behavior that matches user's focus expectations, instead of just relying on <dialog>'s behavior. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== WebUI: Return focus to anchor element when cr-action-menu is closed. The default <dialog> restore focus behavior is not very intuitive (or clear) and certainly does not match the user's expectation when an action menu is closed. Action menu should define its own behavior that matches user's focus expectations, instead of just relying on <dialog>'s behavior. BUG=659567 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/140f168199593fafe11b6a568cdfa99b4d1c9bda Cr-Commit-Position: refs/heads/master@{#429468} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/140f168199593fafe11b6a568cdfa99b4d1c9bda Cr-Commit-Position: refs/heads/master@{#429468} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
