Commit f9d7b67e authored by Alex Danilo's avatar Alex Danilo Committed by Commit Bot

Make search box collapse listener use capture

Clicking on the application to move focus away from the search box
should collapse it.

Change the collapse listener to trigger on event capture phase so that
any calls to preventDefault in other UI components won't block the event
and collapse will happen.

Note, that clicking on UI elements such as the splitter bar and moving
it does not take focus, so the search box will not collapse.

Bug: 1058547
Change-Id: I145c5c1f0dda09b21175cf715c5f6d9960f05649
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097615Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749029}
parent 7e91c6fa
......@@ -173,7 +173,7 @@ class FileManagerUI {
// Add a listener to the dialog container for hiding the search box.
this.dialogContainer.addEventListener('click', (event) => {
this.searchBox.removeHidePending(event);
});
}, true);
/**
* Empty folder UI.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment