mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-27 17:09:53 +02:00
fix to not update placeholder before one exists
This commit is contained in:
@@ -102,6 +102,8 @@ class Placeholder extends React.Component {
|
|||||||
updatePosition = () => {
|
updatePosition = () => {
|
||||||
const { node } = this.props
|
const { node } = this.props
|
||||||
const { placeholder } = this.tmp
|
const { placeholder } = this.tmp
|
||||||
|
if (!placeholder) return
|
||||||
|
|
||||||
const el = findDOMNode(node)
|
const el = findDOMNode(node)
|
||||||
const rect = el.getBoundingClientRect()
|
const rect = el.getBoundingClientRect()
|
||||||
placeholder.style.pointerEvents = 'none'
|
placeholder.style.pointerEvents = 'none'
|
||||||
|
Reference in New Issue
Block a user