I have the need to access the dimensions of the EditorView
on each update to the editor. Consequently, I listen for updates using EditorView.updateListener
and in my handler I get the width and height of the view using code like the following:
totalWidth = this.editorView.dom.offsetWidth;
totalHeight = this.editorView.dom.offsetHeight;
The strange behavior that I am seeing is that each UI action (e.g. click or keypress) in the editor increases the width of the view by 10 pixels! If I just remove the line above which refers to the width the strange behavior goes away.
Any ideas what might be going on?
Thanks in advance.
-Mark