| Summary: | visibility: hidden does not remove focus | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Guan-tin Chien [:timdream] <timdream> | ||||
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | darin, simon.fraser, timdream, webkit-bug-importer, wenson_hsieh | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari Technology Preview | ||||||
| Hardware: | Mac | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=29241 | ||||||
| Attachments: |
|
||||||
Any change here should wait on the resolution of https://github.com/w3c/uievents/issues/236 |
Created attachment 408558 [details] testcase STR: See test case, the page will 0. check the current focused element by looking at `document.activeElement`. 1. focus() the element 2. set visibility: hidden on the element 3. wait for 100ms 4. check the current focused element by looking at `document.activeElement` again. Expected: On Chrome on step 4, the focused element is the body Actual: On Safari and Firefox, the focused element is still the element. Note: 1. The inconsistency suggests that there may be a spec issue here. 2. On Chrome sometime a micro task is enough for the focus to moved away, some times it is not.