Bug 171254

Summary: REGRESSION (r214863): Web Inspector: Uncaught Exception when losing focus from a selector field
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
joepeck: review+
Patch none

Nikita Vasilyev
Reported 2017-04-24 16:26:36 PDT
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.
Attachments
Patch (1.60 KB, patch)
2017-04-25 16:53 PDT, Nikita Vasilyev
joepeck: review+
Patch (1.69 KB, patch)
2017-04-25 20:45 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2017-04-25 09:56:10 PDT
Nikita Vasilyev
Comment 2 2017-04-25 16:46:51 PDT
Nikita Vasilyev
Comment 3 2017-04-25 16:53:05 PDT
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
Joseph Pecoraro
Comment 4 2017-04-25 19:05:30 PDT
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.
Nikita Vasilyev
Comment 5 2017-04-25 20:45:47 PDT
WebKit Commit Bot
Comment 6 2017-04-25 21:27:41 PDT
Comment on attachment 308201 [details] Patch Clearing flags on attachment: 308201 Committed r215789: <http://trac.webkit.org/changeset/215789>
WebKit Commit Bot
Comment 7 2017-04-25 21:27:42 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.