xatom-debug icon indicating copy to clipboard operation
xatom-debug copied to clipboard

Workaround for deprecated getScrollTop call. Fixes issue 36.

Open samhiatt opened this issue 7 years ago • 0 comments

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.

samhiatt avatar Sep 27 '17 23:09 samhiatt