mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 01:33:58 +02:00
fix placeholder positioning
This commit is contained in:
@@ -70,8 +70,8 @@ class Placeholder extends React.Component {
|
|||||||
const rect = nodeEl.getBoundingClientRect()
|
const rect = nodeEl.getBoundingClientRect()
|
||||||
el.style.pointerEvents = 'none'
|
el.style.pointerEvents = 'none'
|
||||||
el.style.position = 'absolute'
|
el.style.position = 'absolute'
|
||||||
el.style.top = `${rect.top}px`
|
el.style.top = `${window.scrollY + rect.top}px`
|
||||||
el.style.left = `${rect.left}px`
|
el.style.left = `${window.scrollX + rect.left}px`
|
||||||
el.style.width = `${rect.width}px`
|
el.style.width = `${rect.width}px`
|
||||||
el.style.height = `${rect.height}px`
|
el.style.height = `${rect.height}px`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user