Open Bug 1538646 Opened 5 years ago Updated 2 years ago

Pasting copied selector+declarations when creating a new rule should create the rule *and* add the declarations

Categories

(DevTools :: Inspector: Rules, enhancement, P3)

67 Branch
enhancement

Tracking

(firefox67 affected, firefox68 affected)

Tracking Status
firefox67 --- affected
firefox68 --- affected

People

(Reporter: cfogel, Unassigned)

Details

Attachments

(1 file)

Attached image pasteBrackets.png

Affected versions

  • 67.0b4, 68.0a1 (2019-03-24)

Affected platforms

  • Windows 10, macOS 10.11, ubuntu 18.04

Steps to reproduce

  1. Launch Firefox and open the Changes tab from the devTools inspector;
  2. Make any change in the rules inspector;
  3. Hover inside the Changes tab on the change;
  4. Click on the Copy Rule button;
  5. Click inside the rules inspector on any class-selector to add more properties;
  6. Paste the copied changes.

Expected result

  • properties are input;

Actual result

  • the class name and starting bracket are pasted;
  • the ending bracket for the pasted content is missing;

Regression range

  • not a regression;

Additional notes

  • attached screenshot with the issue;
  • as per n.2 from this document;
  • this can be viewed as an issue on an already edge-case scenario where someone would want to paste multiple properties inside a class;
  • if copied via this button pasting them inside the inspector could ignore the class indicator and paste just the values;
Has Regression Range: --- → no
Has STR: --- → yes

The behavior, as described in the STR, is correct. The end result is the Rule view trying to deal with unexpected input when adding a CSS declaration.

This isn't a bug with the Changes panel or with the Rules panel behavior as precisely described in the STR, but it would be a good feature to have with a slight adjustment:

When adding a new CSS rule (instead of adding/eding a declaration) in the Rules panel, if the clipboard content pasted into the selector input field looks like a CSS rule, parse it and add the selector and declarations accordingly instead of pasting the text as-is.

This isn't a high-priority for us yet, but I'll put it on the backlog as an idea and change the Bugzilla component accordingly.

Component: Inspector: Changes → Inspector: Rules
Priority: -- → P3

Very good point. This would be a nice feature indeed. I've slightly renamed the bug to reflect this, and I've removed the blocker on the Track Changes M2 project because this feature shouldn't block it from riding the trains to release.

No longer blocks: 1515875
Summary: Pasting copied class+contents in the rules section adds the className and container bracket → Pasting copied selector+declarations when creating a new rule should create the rule *and* add the declarations
Has Regression Range: no → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: