1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-20 21:34:53 +02:00

fix placeholder positioning

This commit is contained in:
Ian Storm Taylor 2016-07-11 19:44:24 -07:00
parent aec4d299ce
commit 2f22fb3366

View File

@ -70,8 +70,8 @@ class Placeholder extends React.Component {
const rect = nodeEl.getBoundingClientRect()
el.style.pointerEvents = 'none'
el.style.position = 'absolute'
el.style.top = `${rect.top}px`
el.style.left = `${rect.left}px`
el.style.top = `${window.scrollY + rect.top}px`
el.style.left = `${window.scrollX + rect.left}px`
el.style.width = `${rect.width}px`
el.style.height = `${rect.height}px`
}