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

Crashes some webpage scripts #623

Open
jmbromley opened this Issue Jul 16, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@jmbromley

jmbromley commented Jul 16, 2018

Darkreader does not appear to be sufficiently isolated. In particular it can cause webpage scripts to crash with the error Uncaught TypeError: Cannot read property 'childNodes' of undefined.

Two examples are:

To reproduce the problem.

  1. Activate Dark Reader

  2. Visit https://ellie-app.com/

  3. Open the browser's javascript console.

  4. Accept the terms and conditions to launch the app.

The result is that the app crashes while loading as can be seen from the javascript console.

Without Dark Reader the app runs without problem, and this is not the only app to have this problem, so it is definitely something Dark Reader is doing.

@alexanderby

This comment has been minimized.

Show comment
Hide comment
@alexanderby

alexanderby Jul 19, 2018

Member

Unfortunately this is how Dynamic mode works. When it meets a <style> element somewhere in the DOM tree, it adds it's own style element with changed colors right after the source. So Ellie App gets a wrong DOM element by index and crashes.

I don't see the way to fix it, it is important to preserve style sheets order and leave the sources untouched.

Currently try using static mode for this page.

Member

alexanderby commented Jul 19, 2018

Unfortunately this is how Dynamic mode works. When it meets a <style> element somewhere in the DOM tree, it adds it's own style element with changed colors right after the source. So Ellie App gets a wrong DOM element by index and crashes.

I don't see the way to fix it, it is important to preserve style sheets order and leave the sources untouched.

Currently try using static mode for this page.

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