1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-07 14:30:04 +01:00
Charlie Martin 29bcb1c8d6 Don't attempt to remove event listeners from non-existent window ()
```
<IFrameComponent>
  <SlateEditor {...props} />
</IFrameComponent>
```

Since react unmounts from top down, `IFrameComponent` will unmount first (destroying its window), then `SlateEditor` will unmount and attempt to access the iframe window (which no longer exists) throwing `Uncaught TypeError: Cannot read property 'document' of undefined`.

It should be safe to skip removing event listeners from windows that no longer exist since they will be garbage collected upon destruction of the window anyway
2017-12-29 10:49:54 -08:00
..
2017-10-27 14:44:18 -07:00
2017-12-12 18:10:57 -05:00

This package contains the React-specific logic for Slate. It's separated further into a series of directories:

  • Components — containing the React components for rendering Slate editors.
  • Constants — containing a few private constants modules.
  • Plugins — containing the React-specific plugins for Slate editors.
  • Utils — containing a few private convenience modules.

Feel free to poke around in each of them to learn more!