Title: [292746] trunk/Source/WebInspectorUI
- Revision
- 292746
- Author
- nvasil...@apple.com
- Date
- 2022-04-11 17:23:05 -0700 (Mon, 11 Apr 2022)
Log Message
Web Inspector: REGRESSION(r290770): Styles: creating a new property scrolls the input to the top of the panel
https://bugs.webkit.org/show_bug.cgi?id=237747
<rdar://problem/90130669>
Reviewed by Patrick Angle.
Remove unnecessary scrollIntoViewIfNeeded call. I added the scrollIntoViewIfNeeded call in 2017 (r222959) because,
at the time, focusing on an input field didn't scroll it into the viewport. It was possible to tab into an element
outside of the viewport and WebKit wouldn't scroll it make it visible. This is no longer the case.
* UserInterface/Views/SpreadsheetSelectorField.js:
(WI.SpreadsheetSelectorField.prototype.startEditing):
Call `focus()` to scroll to the edited element.
* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype.startEditing):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (292745 => 292746)
--- trunk/Source/WebInspectorUI/ChangeLog 2022-04-12 00:19:08 UTC (rev 292745)
+++ trunk/Source/WebInspectorUI/ChangeLog 2022-04-12 00:23:05 UTC (rev 292746)
@@ -1,3 +1,22 @@
+2022-04-11 Nikita Vasilyev <nvasil...@apple.com>
+
+ Web Inspector: REGRESSION(r290770): Styles: creating a new property scrolls the input to the top of the panel
+ https://bugs.webkit.org/show_bug.cgi?id=237747
+ <rdar://problem/90130669>
+
+ Reviewed by Patrick Angle.
+
+ Remove unnecessary scrollIntoViewIfNeeded call. I added the scrollIntoViewIfNeeded call in 2017 (r222959) because,
+ at the time, focusing on an input field didn't scroll it into the viewport. It was possible to tab into an element
+ outside of the viewport and WebKit wouldn't scroll it make it visible. This is no longer the case.
+
+ * UserInterface/Views/SpreadsheetSelectorField.js:
+ (WI.SpreadsheetSelectorField.prototype.startEditing):
+ Call `focus()` to scroll to the edited element.
+
+ * UserInterface/Views/SpreadsheetTextField.js:
+ (WI.SpreadsheetTextField.prototype.startEditing):
+
2022-04-08 Elliott Williams <e...@apple.com>
[Xcode] Avoid targeting 32-bit iOS and Mac architectures
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetSelectorField.js (292745 => 292746)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetSelectorField.js 2022-04-12 00:19:08 UTC (rev 292745)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetSelectorField.js 2022-04-12 00:23:05 UTC (rev 292746)
@@ -59,7 +59,7 @@
element.classList.add("editing");
element.contentEditable = "plaintext-only";
element.spellcheck = false;
- element.scrollIntoViewIfNeeded(false);
+ element.focus();
// Disable syntax highlighting.
element.textContent = element.textContent;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js (292745 => 292746)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js 2022-04-12 00:19:08 UTC (rev 292745)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js 2022-04-12 00:23:05 UTC (rev 292746)
@@ -123,7 +123,6 @@
this._element.classList.add("editing");
this._element.contentEditable = "plaintext-only";
this._element.spellcheck = false;
- this._element.scrollIntoViewIfNeeded(false);
this._element.focus();
this._selectText();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes