Uncaught Exceptions: - TypeError: null is not an object (evaluating 'event.relatedTarget.isDescendant') (at CSSStyleDeclarationSection.js:694:32) _handleBlur @ CSSStyleDeclarationSection.js:694:32 _handleBlur @ [native code] * STEPS TO REPRODUCE 1. Open https://webkit.org; 2. Inspect <body>; 3. Focus on "body.home" selector (any selector would do); 4. Focus on an other app (Command-Tab on macOS). Actual: An uncaught exception is thrown.
<rdar://problem/31813959>
This was introduced by https://trac.webkit.org/changeset/214863/webkit.
Created attachment 308167 [details] Patch > The FocusEvent.relatedTarget read-only property represents a secondary target for this event, which will depend on the event itself. > In some cases (like when tabbing in or out of a page), this property may be set to null for security reasons. https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget
Comment on attachment 308167 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308167&action=review r=me > Source/WebInspectorUI/ChangeLog:9 > + event.relatedTarget of a blur event contains an element where focus moved to. When tabbing out "When tabbing out" is unclear. This makes me think you just pressed tab and suddenly its null, however the steps to reproduce were Command-Tab. I'd rephrase: The event.relatedTarget of a blur event contains the element where focus moved to. In some cases this can be null, such as if the user leaves the application window. For example Command+Tab to switch to another application.
Created attachment 308201 [details] Patch
Comment on attachment 308201 [details] Patch Clearing flags on attachment: 308201 Committed r215789: <http://trac.webkit.org/changeset/215789>
All reviewed patches have been landed. Closing bug.