If you have the Styles sidebar scrolled such that the New Rule button is at the top of the bar, adding a new rule may not scroll to reveal the newly added rule further up in the sidebar.
<rdar://problem/14143547>
Moving to the right component.
Is this still an issue? Every time I add a new rule I always see the newly added rule appear right below the "New Rule" button. Could you possibly elaborate more as to what the specific issue is? Thanks.
Created attachment 254832 [details] Patch
Comment on attachment 254832 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254832&action=review > Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js:305 > + if (this._previousFocusedSection && this._visible) { What if the previous focused section is no longer in the sidebar after a refresh? Can that happen?
Comment on attachment 254832 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254832&action=review >> Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js:305 >> + if (this._previousFocusedSection && this._visible) { > > What if the previous focused section is no longer in the sidebar after a refresh? Can that happen? From what I can see, no it is not. nodeStylesRefreshed is called whenever the node changes and refresh is called before nodeStylesRefreshed. previousFocusedSection is set (unless there was no previously focused section) by refresh and then used (if set) immediately after in nodeStylesRefreshed. Once used, it is set back to null so it can't be reused until another refresh.
Comment on attachment 254832 [details] Patch Clearing flags on attachment: 254832 Committed r185709: <http://trac.webkit.org/changeset/185709>
All reviewed patches have been landed. Closing bug.