Skip to content
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

Insert a rule right after an unsupported rule will fail #1122

Closed
kof opened this issue Jun 11, 2019 · 0 comments · Fixed by #1123
Closed

Insert a rule right after an unsupported rule will fail #1122

kof opened this issue Jun 11, 2019 · 0 comments · Fixed by #1123
Labels
bug It went crazy and killed everyone. complexity:moderate We talked about it, you can do it! important The thing you do when you wake up!

Comments

@kof
Copy link
Member

kof commented Jun 11, 2019

It will fail because we seem to still increase the index, which will result in something like "Failed to execute 'insertRule' on 'CSSStyleSheet': The index provided (10) is larger than the maximum index (9)."

Steps

  1. insert an unsupported rule, for exaple use some weird selector or anything that is unsupported in the current browser:
".Hook-css-4-0-1-6:focus-visible {
  outline: 0;
  z-index: 1;
  box-shadow: 0px 0px 0px 1px #4C98F1;
}"
  1. Insert a valid rule after that
  2. Both should be using insertRule API (function rule)
@kof kof added bug It went crazy and killed everyone. important The thing you do when you wake up! complexity:moderate We talked about it, you can do it! labels Jun 11, 2019
@kof kof closed this as completed in #1123 Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It went crazy and killed everyone. complexity:moderate We talked about it, you can do it! important The thing you do when you wake up!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant