[Webkit-unassigned] [Bug 271814] New: Web Inspector: Editing a nested @media rule's media type from style details panel errs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 27 18:56:33 PDT 2024


            Bug ID: 271814
           Summary: Web Inspector: Editing a nested @media rule's media
                    type from style details panel errs
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: qianlangchen at apple.com
                CC: inspector-bugzilla-changes at group.apple.com

Created attachment 470631

  --> https://bugs.webkit.org/attachment.cgi?id=470631&action=review

Demo test case

If you have a nested @media rule like this:
    body {
        @media (min-width: 800px) {
            color: navy;

Then from the inspector's style details panel, editing the `(min-width: 800px)` part is allowed, but (in local build) the inspector throws an error when you press Enter or change input focus:
    TypeError:​ undefined is not an object (evaluating 'this._selectorTextField.startEditing')​ (at SpreadsheetCSSStyleDeclarationSection.js:​832:​36)​
        _handleSpreadsheetGroupingFieldWillNavigate @ SpreadsheetCSSStyleDeclarationSection.js:​832:​36
        spreadsheetRuleHeaderFieldWillNavigate @ SpreadsheetCSSStyleDeclarationSection.js:​243:​61
        _handleBlur @ SpreadsheetRuleHeaderField.js:​120:​69
        blur @ [native code]​
        _handleKeyDown @ SpreadsheetRuleHeaderField.js:​141:​31

Notably, nesting the @media rule the opposite way like this works just fine:
    @media (min-width: 800px) {
        body {
            color: navy;

No issues while editing any part of that style.

See attached for a test case.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240328/0bce9569/attachment.htm>

More information about the webkit-unassigned mailing list