Bug 218297

Summary: Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._styleSheetTextRange.collapseToEnd')
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: hi, inspector-bugzilla-changes, nvasilyev, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: https://www.target.com/c/halloween-candy-treats/-/N-55hso?Nao=0

Description Devin Rousso 2020-10-28 11:28:37 PDT
# STEPS TO REPRODUCE
1. inspect <https://www.target.com/c/halloween-candy-treats/-/N-55hso?Nao=0>
2. find "Trick-or-Treat" text in the Elements Tab
3. select one of the sibling `.h-sr-only` nodes
4. click in the `.h-sr-only` rule in the Styles panel in the details sidebar

Uncaught Exceptions:
-----------------------
 - TypeError: null is not an object (evaluating 'this._styleSheetTextRange.collapseToEnd') (at CSSStyleDeclaration.js:547:45)
    _rangeAfterPropertyAtIndex @ CSSStyleDeclaration.js:547:45
    newBlankProperty @ CSSStyleDeclaration.js:412:66
    addBlankProperty @ SpreadsheetCSSStyleDeclarationEditor.js:326:73
    _handleClick @ SpreadsheetCSSStyleDeclarationSection.js:608:52
    _handleClick @ [native code]
-----------------------

Notes:
Inspected URL:        https://www.target.com/c/halloween-candy-treats/-/N-55hso?Nao=0
Loading completed:    true
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
Comment 1 Radar WebKit Bug Importer 2020-10-28 11:28:53 PDT
<rdar://problem/70772587>
Comment 2 Devin Rousso 2020-10-28 11:29:31 PDT
NOTE: the CSS source of `.h-sr-only` is inlined in the HTML
Comment 3 Nikita Vasilyev 2020-10-28 11:31:26 PDT
This looks like the same problem as in Bug 218035 Web Inspector: Can't edit certain style rules on twitter.com (created by React Native StyleSheet).

Thanks for reporting, though, now I know that the impact of it is more severe.

*** This bug has been marked as a duplicate of bug 218035 ***