Bug 431151 - TextView.redrawRange() may not trigger enough LineStyle events when called from model Changed handler
Summary: TextView.redrawRange() may not trigger enough LineStyle events when called fr...
Status: NEW
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Editor (show other bugs)
Version: 5.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-03-25 14:02 EDT by Grant Gayed CLA
Modified: 2017-01-25 12:54 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2014-03-25 14:02:58 EDT
- start with:

<script>
</script>
<a>
<b>

- select from the very end of the first line to somewhere within the <a> tag and press Delete
   -> the <b> tag styling does not get changed as a result, but it should since it is now considered to be within a JS block
- this happens because a LineStyle event is not received from the TextView for its line
- putting the caret on this line updates its styling appropriately
Comment 1 Grant Gayed CLA 2014-03-25 14:04:01 EDT
Forgot to mention: the test file should have an .html extension.
Comment 2 Grant Gayed CLA 2015-05-04 10:21:50 EDT
Still happens in the latest.
Comment 3 Eric Moffatt CLA 2015-09-30 10:57:35 EDT
Note that the issue seems to depend on the incorrect line being the last (semantic?) one in the file. I tried this scenario by pasting the given snippet at the beginning of an existing HTML file and the issue doesn't manifest (but does if the snippet is the only text in the file).

Also noticed that if I add another <a> at the end of the snippet then the scenario leaves both the <b> and the new <a> in the same (incorrect) state.