Ticket #2531334 (closed defect)
Reporter Todd Kloots |
Opened: 10/25/11 Last modified: 05/10/12 Status: closed Type: defect Resolution: fixed |
Owner Luke Smith |
Target Release: 3.5.0 Priority: P3 (normal) |
|---|---|---|---|
| Summary: | Regression in ability to delegate focus and blur events | ||
| Description: | As of YUI 3.2.0 when you use delegate() with focus and blur events, and the delegation selector specifies a non-focusable element the listener won't get called. |
||
| Type: | defect | Observed in Version: | 3.2.0 |
| Component: | Event | Severity: | S3 (normal) |
| Assigned To: | Luke Smith | Target Release: | 3.5.0 |
| Location: | Library Code | Priority: | P3 (normal) |
| Tags: | event delegate focus blur | Relates To: | |
| Browsers: | Safari - All,IE - All | ||
| URL: | |||
| Test Information: | |||
Change History
|
Posted: 10/25/11
|
|
Posted: 01/31/12
|
|
Posted: 01/31/12
Yeah - a <span> or a <div> without a tabIndex. The use case is the delegation selector specifies an element that is the parent of an element that is actually focusable/the real target of the focus or blur event. Say, as in the attached example, for the purpose of styling you've got a <span> or two wrapping a button. And so your delegation selector is the outmost <span> for the purpose of toggling a class on that span when the button inside it receives focus. Does that help clarify? |
|
Posted: 03/2/12
Rewrite the notification logic for focus/blur It was relying on the function returned from Y.delegate.compileFilter I had to move the filter test into the notification phase and do a Fixes #2531334 |
|
Posted: 03/2/12
|
|
Posted: 05/10/12
checkedin -> closed |
I glanced over the code and didn't see anything that stood out.....until just now as I type. It's probably the reliance on the actual focus and blur events, since they won't be emitted by the non-focusable elements.
When you say you're delegating on a non-focusable element, can be more specific? As in a <span> or <div> without a tabindex? Or even one with a tabindex?