el.closest not supported in IE11
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What’s the current behavior?
el.closest
is called from Content.isInEditor
(among a number of places). It seems like this method is not supported in IE11, and it throws an error.
What’s the expected behavior?
The error should not occur. One possible solution (based on mdn web docs) is just to polyfill the method.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to support .closest in IE11 - javascript - Stack Overflow
I'm thinking of just replacing . closest with one IE11 supports. The . closest() method of the DOM traversal has nothing to do...
Read more >Element.closest() - Web APIs - MDN Web Docs
The closest() method of the Element interface traverses the element and its parents (heading toward the document root) until it finds a node ......
Read more >Quote reply not working in IE 11 - bug - Discourse Meta
When using IE 11 highlighting text does not reveal the “quote” pop up. It works fine in chrome and I confirmed myself that...
Read more >Practical Use Cases for JavaScript's closest() Method
Element.closest() allows us to traverse up the DOM until we get an element that matches the given selector. The awesomeness is that we...
Read more >Browser Support - jQuery
Unsupported Browsers. While jQuery might run without major issues in older browser versions, we do not actively test jQuery in them and generally...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Two polyfills for IE11, that made Slate working in IE 11
Feel free to submit a pull request mentioning that older browsers will need to use polyfills for things like
el.closest
.I realize that IE is the latest Internet Explorer, but seeing as it’s superseded by Edge, and doesn’t have tons of the functionality that is considered baseline these days, it’s not something that we’re going to support without polyfills. Otherwise every single library starts re-bundling the same polyfills over and over and everyone else suffers from bloat.