RESOLVED INVALID 30665
REGRESSION: Web Inspector: blur and focus Events are Fired Too Often
https://bugs.webkit.org/show_bug.cgi?id=30665
Summary REGRESSION: Web Inspector: blur and focus Events are Fired Too Often
Joseph Pecoraro
Reported 2009-10-22 00:20:46 PDT
Blur and Focus events are not acting as expected. This has caused a regression with tabbing while editing Element attributes. The following are cases I've found where the events are fired too frequently. All are in inspector.js: WebInspector.windowFocused: - Fired multiple times on focusing the Inspector - http://grab.by/bdt (notice the unexpected event.targets) WebInspector.windowBlured - Fired multiple times on blurring the Inspector - http://grab.by/bdt (notice the unexpected event.targets) Blur event listener on element in WebInspector.startEditing: - This is a Regression - Fired when blurring the first element and then again immediately on the moved too element
Attachments
Joseph Pecoraro
Comment 1 2009-10-22 00:28:13 PDT
The first two are registered as follows: X.addEventListener("focus", this.windowFocused.bind(this), true); X.addEventListener("blur", this.windowBlured.bind(this), true); By changing the "bubbling" boolean to false these events fire only when expected and with the expected target (document.defaultView). However, I looked at the spec to try and understand the behavior when this attribute was true and I came across the following: http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-types-list > All events must accomplish the capture and target phases, > but not all of them must accomplish the bubbling phase" In the table, the Spec shows "blur" and "focus" events do not accomplish the bubbling phase. What then is the behavior I am seeing when the listeners are registered as non-capturing? The WebInspector.startEditing event listener does use "false" in its declaration. Based on the Spec is this valid? As for the regression, I do not know what caused that. Does anyone have a setup where doing a binary search through the history to narrow down a revision would not take all day?! =)
Joseph Pecoraro
Comment 2 2009-10-22 00:29:40 PDT
> By changing the "bubbling" boolean to false Correction: this is the "useCapture" boolean.
Rob Colburn
Comment 3 2012-05-10 13:59:11 PDT
This is an old bug. @Joseph, what's the status, are you still experiencing the issue?
Note You need to log in before you can comment on or make changes to this bug.