fix: insertion cursor position is incorrect
This commit is contained in:
parent
7b91944fbf
commit
2987c2d85d
2 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,6 @@ import { version } from '@/../package.json'
|
||||||
|
|
||||||
export const EMOJI_LIST = [
|
export const EMOJI_LIST = [
|
||||||
'😀',
|
'😀',
|
||||||
'😃',
|
|
||||||
'😄',
|
'😄',
|
||||||
'😁',
|
'😁',
|
||||||
'😆',
|
'😆',
|
||||||
|
@ -113,6 +112,7 @@ export const EMOJI_LIST = [
|
||||||
'👽',
|
'👽',
|
||||||
'👾',
|
'👾',
|
||||||
'🤖',
|
'🤖',
|
||||||
|
'👀',
|
||||||
'😺',
|
'😺',
|
||||||
'😸',
|
'😸',
|
||||||
'😹',
|
'😹',
|
||||||
|
|
|
@ -20,12 +20,14 @@ const useCursorPosition = () => {
|
||||||
handleRef.current.removeEventListener('input', handler)
|
handleRef.current.removeEventListener('input', handler)
|
||||||
handleRef.current.removeEventListener('keydown', handler)
|
handleRef.current.removeEventListener('keydown', handler)
|
||||||
handleRef.current.removeEventListener('keyup', handler)
|
handleRef.current.removeEventListener('keyup', handler)
|
||||||
|
handleRef.current.removeEventListener('focus', handler)
|
||||||
}
|
}
|
||||||
if (node) {
|
if (node) {
|
||||||
node.addEventListener('click', handler)
|
node.addEventListener('click', handler)
|
||||||
node.addEventListener('input', handler)
|
node.addEventListener('input', handler)
|
||||||
node.addEventListener('keydown', handler)
|
node.addEventListener('keydown', handler)
|
||||||
node.addEventListener('keyup', handler)
|
node.addEventListener('keyup', handler)
|
||||||
|
node.addEventListener('focus', handler)
|
||||||
}
|
}
|
||||||
handleRef.current = node
|
handleRef.current = node
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue