Reputation: 11619
The ace editor centers the view (scrolls horizontally) on the cursor even when the cursor is not outside the screen.
This happens after resize the ace editor container.
How to prevent ace editor to center on the cursor when it is not necessary?
Upvotes: 2
Views: 767
Reputation: 11619
This example illustrates the problem.
To update the ace editor with the new width, use editor.resize()
:
$(window).mouseup ()->
if dragging
editor.resize()
dragging = false
return
Upvotes: 3