Changeset 196798 in webkit
- Timestamp:
- Feb 18, 2016 9:26:53 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r196788 r196798 1 2016-02-18 Devin Rousso <dcrousso+webkit@gmail.com> 2 3 Web Inspector: Styles Sidebar focus jumps when trying to edit a color 4 https://bugs.webkit.org/show_bug.cgi?id=154404 5 <rdar://problem/24725744> 6 7 Reviewed by Timothy Hatcher. 8 9 Clicking an inline swatch in the CSS Rules sidebar causes any focused 10 editor, if any, to become blurred and therefore fire its handler function. 11 This causes an issue because when a CodeMirror instance in the styles 12 sidebar becomes blurred, it is possible for the entire Rules sidebar to 13 refresh and recreate all of the sections (r187714), meaning that it will 14 reselect whatever editor was previously selected before the refresh, 15 causing the swatch popup to be blurred and therefore dismiss. 16 17 * UserInterface/Views/CSSStyleDeclarationSection.js: 18 (WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor): 19 20 * UserInterface/Views/CSSStyleDeclarationTextEditor.js: 21 (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.createSwatch): 22 (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchBeforeClicked): 23 Add listener for new event and call to delegate function for handling it. 24 25 * UserInterface/Views/InlineSwatch.js: 26 (WebInspector.InlineSwatch.prototype._swatchElementClicked): 27 Now fires an event before the clicked logic happens, but still after the 28 click event is fired on the element. 29 30 * UserInterface/Views/RulesStyleDetailsPanel.js: 31 (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor): 32 Clears the previously focused editor so when a reset happens no editor 33 is refocused. 34 1 35 2016-02-18 Joseph Pecoraro <pecoraro@apple.com> 2 36 -
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js
r196739 r196798 325 325 } 326 326 327 cssStyleDeclarationTextEditorBlurActiveEditor() 328 { 329 if (typeof this._delegate.cssStyleDeclarationSectionBlurActiveEditor === "function") 330 this._delegate.cssStyleDeclarationSectionBlurActiveEditor(this); 331 } 332 327 333 cssStyleDeclarationTextEditorSwitchRule(reverse) 328 334 { -
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js
r196746 r196798 872 872 function createSwatch(swatch, marker, valueObject, valueString) 873 873 { 874 swatch.addEventListener(WebInspector.InlineSwatch.Event.BeforeClicked, this._inlineSwatchBeforeClicked, this); 874 875 swatch.addEventListener(WebInspector.InlineSwatch.Event.ValueChanged, this._inlineSwatchValueChanged, this); 875 876 … … 1303 1304 } 1304 1305 1306 _inlineSwatchBeforeClicked(event) 1307 { 1308 if (this._delegate && typeof this._delegate.cssStyleDeclarationTextEditorBlurActiveEditor === "function") 1309 this._delegate.cssStyleDeclarationTextEditorBlurActiveEditor(); 1310 } 1311 1305 1312 _inlineSwatchValueChanged(event) 1306 1313 { -
trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js
r194977 r196798 107 107 _swatchElementClicked(event) 108 108 { 109 this.dispatchEventToListeners(WebInspector.InlineSwatch.Event.BeforeClicked); 110 109 111 if (this._type === WebInspector.InlineSwatch.Type.Color && event.shiftKey && this._value) { 110 112 let nextFormat = this._value.nextFormat(); … … 265 267 266 268 WebInspector.InlineSwatch.Event = { 269 BeforeClicked: "inline-swatch-before-clicked", 267 270 ValueChanged: "inline-swatch-value-changed" 268 271 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js
r194717 r196798 321 321 } 322 322 323 cssStyleDeclarationSectionBlurActiveEditor() 324 { 325 this._previousFocusedSection = null; 326 } 327 323 328 cssStyleDeclarationSectionEditorNextRule(currentSection) 324 329 {
Note: See TracChangeset
for help on using the changeset viewer.