* SUMMARY Unable to get cursor in new Rule section after creating multiple New Rules. * STEPS TO REPRODUCE 1. Inspect <body> on about:blank 2. Show Styles Rules sidebar 3. Click "New Rule" => creates a new "body" section with cursor in editor 4. Click "New Rule" again => cannot focus the textfield in either new section
<rdar://problem/21070246>
It appears as if the sections are "readOnly". Because they are getting the readonly placeholder string and not the editable placeholder string.
CSSStyleDeclarationTextEditor's _resetContent sets things readonly if: // Only allow editing if we have a style, it is editable and we have text range in the stylesheet. var readOnly = !this._style || !this._style.editable || !this._style.styleSheetTextRange; In this case, the styleSheetTextRange is null...
I have a feeling this happened with the InspectorStyleSheet::styleSheetMutated changes. I'm going to try allowing InspectorStyleSheet parsed data always for the inspector style sheet, since we control modifications to it. Building now.
Created attachment 253599 [details] [PATCH] Proposed Fix
Comment on attachment 253599 [details] [PATCH] Proposed Fix Clearing flags on attachment: 253599 Committed r184792: <http://trac.webkit.org/changeset/184792>
All reviewed patches have been landed. Closing bug.