Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Switching between multiple CSS rules may show incorrect css code if there is some changes in the css file.. #572

Closed
RaymondLim opened this issue Apr 5, 2012 · 4 comments

Comments

@RaymondLim
Copy link
Contributor

  1. Open an inline editor that has at least 2 css rules and remember the line numbers shown next to the file title (both in left pane and right pane).
  2. Open the CSS file that has the css code currently shown in the inline editor.
  3. Insert some lines at the top of the files.
  4. Switch back to the html file and select another rule from the rule list UI.
  5. Then select the previously selected rule (the one selected in step Jason sanjose/js test driver #1) from rule list UI.

Result: inline editor will show css code from the previous range. Also the line number next to the file title is still showing the old line number.

@RaymondLim
Copy link
Contributor Author

Maybe related to #539.

@peterflynn
Copy link
Member

Yes, I believe they are basically the same bug

peterflynn added a commit that referenced this issue Apr 6, 2012
- TextRange autonomously listens for Document events rather than client code
  needing to ping it
- CSSInlineEditor now stores its results with TextRanges, which fixes both
  bug #538 (because the Docs are now addRef()ed) and the nastiest aspect of
  bugs #572/#539 (editors showing bad range after selecting different item
  in results list).
- Changed the way CSSInlineEditor stores rule list items, from two parallel
  arrays to an array of objects. Updated unit tests too.

Two bugs remain with ranges in the results list:
- The line numbers in the results list UI don't update as the ranges change
- If a range falls entirely out of sync, we crash when you try to select
  that result later (inline should close instead)
@peterflynn
Copy link
Member

Fixed by pull #583. FBNC @RaymondLim.

@RaymondLim
Copy link
Contributor Author

Fix verified

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants