WebKit Bugzilla
Attachment 358542 Details for
Bug 193218
: Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 2.92 KB, created by
Nikita Vasilyev
on 2019-01-07 15:27:49 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Nikita Vasilyev
Created:
2019-01-07 15:27:49 PST
Size:
2.92 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index e164d1ecffb..50cc44c5eb8 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,19 @@ >+2019-01-07 Nikita Vasilyev <nvasilyev@apple.com> >+ >+ Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection >+ https://bugs.webkit.org/show_bug.cgi?id=193218 >+ <rdar://problem/47098303> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown): >+ A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens. >+ >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick): >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick): >+ (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection): >+ > 2019-01-07 Devin Rousso <drousso@apple.com> > > Web Inspector: extend XHR breakpoints to work with fetch >diff --git a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >index d4f7dbc4eef..6fa142d2a27 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js >@@ -407,8 +407,11 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > else > this._propertiesEditor.deselectProperties(); > >- this._mouseDownIndex = propertyIndex; >- this._element.classList.add("selecting"); >+ if (propertyElement.parentNode) { >+ this._mouseDownIndex = propertyIndex; >+ this._element.classList.add("selecting"); >+ } else >+ this._stopSelection(); > } > > _handleWindowClick(event) >@@ -417,15 +420,13 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > // Don't start editing name/value if there's selection. > event.stop(); > } >- >- this._isMousePressed = false; >- this._mouseDownIndex = NaN; >- >- this._element.classList.remove("selecting"); >+ this._stopSelection(); > } > > _handleClick(event) > { >+ this._stopSelection(); >+ > if (this._wasEditing || this._propertiesEditor.hasSelectedProperties()) > return; > >@@ -451,6 +452,13 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS > } > } > >+ _stopSelection() >+ { >+ this._isMousePressed = false; >+ this._mouseDownIndex = NaN; >+ this._element.classList.remove("selecting"); >+ } >+ > _highlightNodesWithSelector() > { > if (!this._style.ownerRule) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193218
:
358538
| 358542 |
358545
|
358562