Fix timing issue where the color well is sometimes not focused initially
Since the ColorPicker's resize event listener is registered asynchronously during another event callback, it is possible for it to be registered too late to catch the resize event fired as a result of the resizeWindow() call in initializeColorPicker(). The resize event listener is responsible for setting the initial focus on the ColorWell, so when it's missed focus remains outside of the popup. This change moves the addEventListener to occur synchronously during the ColorPicker constructor so that it will never attach too late. There's no test because I couldn't get this to repro in a test environment. I've only seen it occur reliably in full Chrome (not content_shell) with Narrator running, presumably because generating the AX tree changes up the timing enough to expose the issue. Change-Id: I752d86b3d9bf3c1462afd1705b8ce15aee28ef76 Bug: 1026183 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2148158Reviewed-by:Ionel Popescu <iopopesc@microsoft.com> Reviewed-by:
Mason Freed <masonfreed@chromium.org> Commit-Queue: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/master@{#759868}
Showing
Please register or sign in to comment