Steps: 1. Open Web Inspector on https://webkit.org 2. Press Command-Option-O 3. Type "global.js", press Enter Expected: global.js opens with text caret inside of it, so a person could immediately type or select text. Actual: global.js opens, but it doesn't get focused. Notes: Via https://bugs.webkit.org/show_bug.cgi?id=159732#c8
<rdar://problem/27830981>
Created attachment 285965 [details] Patch
Comment on attachment 285965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285965&action=review > Source/WebInspectorUI/UserInterface/Views/TextEditor.js:477 > + Focusing works well for the current resource (e.g. ":100:42") but it still doesn't work for a different resource (e.g. "foo.js:100:42") :-/
Comment on attachment 285965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285965&action=review > Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js:144 > + contentView.revealPosition(new WebInspector.SourceCodePosition(cookie.lineNumber, cookie.columnNumber), textRangeToSelect, forceUnformatted, shouldFocus); Entering just "foo.js" without line numbers should still focus on the text editor, so I think focusing should NOT be done by contentView.revealPosition. Back to the drawing board.