ji-devs / draft-canvas

https://jewish-interactive.github.io/draft-canvas
MIT License
0 stars 0 forks source link

Do not use document.getElementById #8

Closed dakom closed 6 years ago

dakom commented 6 years ago

In this code: https://github.com/jewish-interactive/draft-canvas/blob/141d46acef1b1c90e3e53785f06288c246693890/src/lib/components/Canvas/index.tsx#L22

Instead of creating the canvas with an id, and accessing it like that, please use a different approach (such as a ref)

The reason is that this id may conflict with other elements on the page

jpuri commented 6 years ago

The issue has been fixed by using ref.