Settings: Add reusable contextual search mechanism
- Add FindShortcutBehavior for handling Ctrl/Cmd+f keyboard shortcut - Use new behavior in <settings-ui> and <settings-add-languages-dialog> The functional results of this change: - Ctrl/Cmd+f focuses settings-specific search box (+ prevents default) - Ctrl/Cmf+f does nothing when a <dialog> (i.e. side bar) is showing Note: when navigating to a subpage, focus seems to be lost (both with keyboard and with mouse), so Ctrl/Cmd+f doesn't trigger settings-specific search in these cases. Bug: 819770 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: I8e8263827b107aaf256900750ea14409b736f597 Reviewed-on: https://chromium-review.googlesource.com/956901 Commit-Queue: Dan Beam (no longer on Chrome) <dbeam@chromium.org> Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#557427}
Showing
Please register or sign in to comment