Skip to content

Conversation

@samhiatt
Copy link

This fixes issue 36.

I was added a workaround by adding a check to see if the function getScrollTop is defined, falling back on the old api if not. Not sure why the 'editor' passed into getEditorPositionFromEvent sometimes uses the old api, and sometimes uses the new one. This workaround accommodates both cases.

Thanks to this comment on issue 170 at ionide

You have to use editor.getScrollTop() instead of editor.displayBuffer.getScrollTop() in the definiton of bufferPositionFromMouseEvent, because getScrollTop has moved from DisplayBuffer to TextEditorElement since atom/atom@535a9da.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught TypeError: editor.element.getScrollTop is not a function

1 participant