Internet Explorer 11 support
See original GitHub issueI have been working on getting our platform compatible in IE11 and Slate is really close. In fact with just a couple polyfills, it mostly works. I know there isn’t official support for IE with Slate, but I figured I would document my findings here seeing as I don’t believe it would take too much work to get it working in IE.
- No support for
Element.closest()
. This is used through out the Slate codebase. Easy to polyfill, I used the one here: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill. This might be good to replace with a built in closest utility instead of relying on the browser seeing as Edge also lacks support for it. - No support for
Selection.extend()
. I know this is used a few times in components/leaf.js, possibly elsewhere as well. Unfortunately I couldn’t find a solid polyfill for this. If someone finds one I’d love to get my hands on it. Instead I wrote my own: https://gist.github.com/tyler-johnson/0a3e8818de3f115b2a2dc47468ac0099. It works for Slate, but I’m not sure how compatible it is with the native version. DataTransfer.setData()
only supports a type value of ‘text’. This affects all of the drag-n-drop support, but more specifically these lines: utils/get-transfer-data.js#L21-L25. Judging by that code, I think its possible to fix this by making an exception for IE where only text types are allowed and everything else is ignored or interpreted as text. Not the most elegant, but at least some forms of drag-n-drop would be possible.- No
window.scrollX
orwindow.scrollY
. This is used in utils/scroll-to-selection.js. MDN says to usepageXOffset
andpageYOffset
and my local tests show that these replacements do work.
Let me know if I can help to get Slate working in IE; I can definitely open pull-requests. Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:17
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Internet Explorer 11 - Microsoft Lifecycle
The Internet Explorer (IE) 11 desktop application ended support for Windows 10 semi-annual channel on June 15, 2022. Customers are encouraged to move...
Read more >Internet Explorer 11 has retired and is officially out of support ...
After 25+ years of helping people use and experience the web, Internet Explorer (IE) is officially retired and out of support as of...
Read more >Internet Explorer 11 End of Life - Lansweeper.com
Internet Explorer 11 is going end of life on June 15, 2022. Meaning that for most Windows versions, using Internet Explorer 11 won't...
Read more >Internet Explorer 11 - Wikipedia
Internet Explorer 11 ; MSHTML v8.0, Chakra · Windows 7 SP1 Windows Server 2008 R2 SP1 Windows Embedded 8 Standard · Windows Server...
Read more >IE11 end of support countdown
Sources before May 19th 2021 · Support for older versions of Internet Explorer ended · Windows 10 product lifecycle · IE11 Mainstream End...
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
FYI slatejs.org is working great on Edge now, though IE11 does have some minor quirks here and there.
getData
/setData
with anything other than regular oldtext
types. We can probably detect this and account for it; I’ll look into a pull request for it shortly.display: inline-block
or similar.I submitted a fairly simple PR for a
Selection.extend
shim in #730, as well as a shim for theElement.closest
in #728. ThescrollX/Y
changes were merged in #664, too!After these get merged it should make Slate usable in both IE11 and Edge, at least in the core functionality! 👍