Title: [261933] trunk/Source/WebInspectorUI
- Revision
- 261933
- Author
- nvasil...@apple.com
- Date
- 2020-05-20 11:01:49 -0700 (Wed, 20 May 2020)
Log Message
REGRESSION(r260978): Web Inspector: Styles: Pressing Space no longer toggles selected properties
https://bugs.webkit.org/show_bug.cgi?id=212121
Reviewed by Devin Rousso.
r260978 removed `tabIndex = -1` from the style property element so it wouldn't have a focus outline
when in the Computed panel. However, this also made style properties non-focusable in the Styles panel.
This patch sets `tabIndex = -1` on style property elements when they can be selected (e.g. in the Styles panel).
It doesn't set any tabIndex for style property elements in Computed or Changes panels.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
* UserInterface/Views/SpreadsheetStyleProperty.js:
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (261932 => 261933)
--- trunk/Source/WebInspectorUI/ChangeLog 2020-05-20 17:59:59 UTC (rev 261932)
+++ trunk/Source/WebInspectorUI/ChangeLog 2020-05-20 18:01:49 UTC (rev 261933)
@@ -1,3 +1,20 @@
+2020-05-20 Nikita Vasilyev <nvasil...@apple.com>
+
+ REGRESSION(r260978): Web Inspector: Styles: Pressing Space no longer toggles selected properties
+ https://bugs.webkit.org/show_bug.cgi?id=212121
+
+ Reviewed by Devin Rousso.
+
+ r260978 removed `tabIndex = -1` from the style property element so it wouldn't have a focus outline
+ when in the Computed panel. However, this also made style properties non-focusable in the Styles panel.
+
+ This patch sets `tabIndex = -1` on style property elements when they can be selected (e.g. in the Styles panel).
+ It doesn't set any tabIndex for style property elements in Computed or Changes panels.
+
+ * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
+ (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
+ * UserInterface/Views/SpreadsheetStyleProperty.js:
+
2020-05-15 Devin Rousso <drou...@apple.com>
Web Inspector: Fails to pretty-print a particular CSS file
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js (261932 => 261933)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2020-05-20 17:59:59 UTC (rev 261932)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js 2020-05-20 18:01:49 UTC (rev 261933)
@@ -95,7 +95,7 @@
let propertyViewPendingStartEditing = null;
for (let index = 0; index < properties.length; index++) {
let property = properties[index];
- let propertyView = new WI.SpreadsheetStyleProperty(this, property);
+ let propertyView = new WI.SpreadsheetStyleProperty(this, property, {selectable: true});
propertyView.index = index;
this.element.append(propertyView.element);
this._propertyViews.push(propertyView);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js (261932 => 261933)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js 2020-05-20 17:59:59 UTC (rev 261932)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js 2020-05-20 18:01:49 UTC (rev 261933)
@@ -36,6 +36,9 @@
this._readOnly = options.readOnly || false;
this._element = document.createElement("div");
+ if (options.selectable)
+ this._element.tabIndex = -1;
+
this._contentElement = null;
this._nameElement = null;
this._valueElement = null;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes