New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLElement.shadowRoot is deprecated. #94

Open
zhuangyin8 opened this Issue Jun 23, 2017 · 5 comments

Comments

Projects
None yet
5 participants
@zhuangyin8

zhuangyin8 commented Jun 23, 2017

The contents of atom-text-editor elements are no longer encapsulated
within a shadow DOM boundary. Please, stop using shadowRoot and access
the editor contents directly instead.

HTMLElement.shadowRoot (C:\Users\zhuan_f\AppData\Local\atom\app-1.19.0-beta0\resources\app\src\text-editor-element.js:13:10)
MarkdownScrlSync.getVisTopHgtBot (C:\Users\zhuan_f\.atom\packages\markdown-scroll-sync\lib\utils.coffee:20:33)
MarkdownScrlSync.setMap (C:\Users\zhuan_f\.atom\packages\markdown-scroll-sync\lib\map.coffee:25:14)
MarkdownScrlSync.startTracking (C:\Users\zhuan_f\.atom\packages\markdown-scroll-sync\lib\main.coffee:75:12)
<unknown> (C:\Users\zhuan_f\.atom\packages\markdown-scroll-sync\lib\main.coffee:58:23)
Function.module.exports.Emitter.simpleDispatch (<embedded>:63204:20)
@chrishough

This comment has been minimized.

chrishough commented Jun 24, 2017

Verified. I seeing this too.

@lucasvieites

This comment has been minimized.

lucasvieites commented Oct 26, 2017

For people searching to fix this in their local installation, you can simply open the utils.coffee file in your .atom/packages/markdown-scroll-sync/lib directory and change this line:
lineEles = @editorView.shadowRoot.querySelectorAll '.lines .line[data-screen-row]'
to this:
lineEles = @editorView.getRootNode().querySelectorAll '.lines .line[data-screen-row]'

and restart Atom.
I hope this helps you out until @vincentcn finds someone who will take over this project and a new version is published.

@linjialiang

This comment has been minimized.

linjialiang commented Dec 10, 2017

In the latest version, according to your method, the plug-in will be invalid.

@linjialiang

This comment has been minimized.

linjialiang commented Dec 13, 2017

@lucasvieites @mark-hahn The latest version of the atomic editor, if it is modified in this way, this plug-in will be meaningless

@linkp

This comment has been minimized.

linkp commented Dec 19, 2017

Duplicate of #65

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