adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

[Core][New Rule]: Incorrect behavior on css inline editor when creating a new rule. #6371

Open julieyuan opened 10 years ago

julieyuan commented 10 years ago

Steps:

  1. Launch Brackets and open the default sample file index.html.
  2. Right click the tag <p> and select Quick Edut.
  3. Click the button New Rule to create a new rule for tag <p>
  4. Close the inline css editor for tag <p>
  5. Reopen the inline css editor for tag <p>
  6. Open main.css file and toggle comments for keyframes
  7. Repeat step 2-4.

Result: At step5, on the css inline editor for tag <p>, it shows an extra }(line 74 on main.css file). At step7, it shows the comments on the css inline editor.

Expected: There is no extra } at step5 and no comments at step7.

ENV: MAC10.8 and Win8.1 English OS Build: 0.36.0-10979(Win OS) and 0.36.0-10941(Mac OS)

Snapshots: Please refer to snapshots for details: Step5: new rule Step7: new rule-2

njx commented 10 years ago

To me, low priority. In general I think we should be properly adjusting the start of the inline editor when lines are added above, but it could be that this is doing a more complex edit that we're not properly dealing with.