-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
area:coreA bug/feature for the core code-input.js/code-input.css filesA bug/feature for the core code-input.js/code-input.css filesbugSomething isn't workingSomething isn't workingpriority:low
Milestone
Description
To reproduce this:
- Open the highlight.js code-input Tester page and answer the confirmation dialogs.
- Delete all of the code from the
code-inputelement at the bottom of the page and replace it with<abc> - Look in DevTools. The
codeelement's classes and its contents update every single frame.

- Add a long string of
as to the end of the<abc>so the textarea begins to scroll horizontally; you now can't scroll back to the left without moving the cursor to the left. This is very likely due to the blur/focus to move to the caret lines of code in theupdatefunction.
This occurs in both Chrome and Firefox.
My suspicions are that the update function is being called every frame. The code-input library removes the highlighted="yes" attribute on the pre code in order to be able to highlight text live, but this might be causing problems with recursion present in PHP template language. This does not occur with autodetected JavaScript.
Metadata
Metadata
Assignees
Labels
area:coreA bug/feature for the core code-input.js/code-input.css filesA bug/feature for the core code-input.js/code-input.css filesbugSomething isn't workingSomething isn't workingpriority:low