Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update focusin/focusout event order to match implementations? #276

Closed
devongovett opened this issue Aug 26, 2020 · 1 comment
Closed

Update focusin/focusout event order to match implementations? #276

devongovett opened this issue Aug 26, 2020 · 1 comment

Comments

@devongovett
Copy link

I noticed that the spec says

This event type MUST be dispatched before the element is given focus. The event target MUST be the element which is about to receive focus. This event type is similar to focus, but is dispatched before focus is shifted, and does bubble.

However, I couldn't find a single implementation that behaves this way. In all browsers I tested focusin is fired after focus. Same is true of blur and focusout. Additionally, document.activeElement is already updated to the new element in the focusin handler.

Should the spec be updated to match implementations?

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Nov 13, 2020
Use testdriver Action API to simulate mouse actions in
uievents/order-of-events/focus-events/focus.html.

This test now matches major browser implementations that "focus"
preceeds "focusin", and "blur" preceeds "focusout".  See:
    w3c/uievents#276.

Bug: 1145677
Change-Id: I9e5965c90a18560cce560b73a3df88d0e840473d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Nov 14, 2020
Use testdriver Action API to simulate mouse actions in
uievents/order-of-events/focus-events/focus.html.

This test now matches major browser implementations that "focus"
preceeds "focusin", and "blur" preceeds "focusout".  See:
    w3c/uievents#276.

Bug: 1145677
Change-Id: I9e5965c90a18560cce560b73a3df88d0e840473d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519193
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827515}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Nov 14, 2020
Use testdriver Action API to simulate mouse actions in
uievents/order-of-events/focus-events/focus.html.

This test now matches major browser implementations that "focus"
preceeds "focusin", and "blur" preceeds "focusout".  See:
    w3c/uievents#276.

Bug: 1145677
Change-Id: I9e5965c90a18560cce560b73a3df88d0e840473d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519193
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827515}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this issue Nov 14, 2020
Use testdriver Action API to simulate mouse actions in
uievents/order-of-events/focus-events/focus.html.

This test now matches major browser implementations that "focus"
preceeds "focusin", and "blur" preceeds "focusout".  See:
    w3c/uievents#276.

Bug: 1145677
Change-Id: I9e5965c90a18560cce560b73a3df88d0e840473d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519193
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827515}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Nov 18, 2020
…us.html, fix event order., a=testonly

Automatic update from web-platform-tests
Simulate user inputs in focus-events/focus.html, fix event order.

Use testdriver Action API to simulate mouse actions in
uievents/order-of-events/focus-events/focus.html.

This test now matches major browser implementations that "focus"
preceeds "focusin", and "blur" preceeds "focusout".  See:
    w3c/uievents#276.

Bug: 1145677
Change-Id: I9e5965c90a18560cce560b73a3df88d0e840473d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519193
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827515}

--

wpt-commits: 32924d3a622fea7c0c8547b204bf3017baf8e280
wpt-pr: 26401
sidvishnoi pushed a commit to sidvishnoi/gecko-webmonetization that referenced this issue Nov 18, 2020
…us.html, fix event order., a=testonly

Automatic update from web-platform-tests
Simulate user inputs in focus-events/focus.html, fix event order.

Use testdriver Action API to simulate mouse actions in
uievents/order-of-events/focus-events/focus.html.

This test now matches major browser implementations that "focus"
preceeds "focusin", and "blur" preceeds "focusout".  See:
    w3c/uievents#276.

Bug: 1145677
Change-Id: I9e5965c90a18560cce560b73a3df88d0e840473d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519193
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827515}

--

wpt-commits: 32924d3a622fea7c0c8547b204bf3017baf8e280
wpt-pr: 26401
@saschanaz
Copy link
Member

It seems this is a duplicate of #88.

mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
Use testdriver Action API to simulate mouse actions in
uievents/order-of-events/focus-events/focus.html.

This test now matches major browser implementations that "focus"
preceeds "focusin", and "blur" preceeds "focusout".  See:
    w3c/uievents#276.

Bug: 1145677
Change-Id: I9e5965c90a18560cce560b73a3df88d0e840473d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519193
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827515}
GitOrigin-RevId: 50b853d146397a05a4719a9b66ffbf0ae329c5d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants