emmetio/codemirror-plugin

This Combo Freezes the Browser

Closed this issue · 4 comments

  1. Put <div>1</div> in the HTML
  2. Select characters >1</div with cursor
  3. Hit Backspace
  4. The page stops responding and finally crashes with error "Out of Memory"

Can reproduce at http://download.emmet.io/codemirror/index.html

Can’t reproduce, even on CodePen. Maybe there’s a specific syntax you’re using?

Here's a video of those steps exactly:
https://d.pr/v/xC4cwB

Chrome 89 on macOS.

The freeze lasts for 20 seconds or so, then you can see the browser give up and Aw Snap!

Fixed in v.1.2.4.
FYI, the problem was in Auto Rename Tag feature which automatically renames tag when you modify either open or closing part. In your example, closed tag range became empty and in invalid location so it caused infinite document grow with new div fragment

Thank you!