emoji picker improvements (#2392)
* rework emoji picker * dynamic position * always prefer the left if it will fit * add accessibility label * Update EmojiPicker.web.tsx oops. remove accessibility from fake button
This commit is contained in:
@@ -22,6 +22,7 @@ import {useActorAutocompleteFn} from '#/state/queries/actor-autocomplete'
|
||||
export interface TextInputRef {
|
||||
focus: () => void
|
||||
blur: () => void
|
||||
getCursorPosition: () => DOMRect | undefined
|
||||
}
|
||||
|
||||
interface TextInputProps {
|
||||
@@ -169,6 +170,10 @@ export const TextInput = React.forwardRef(function TextInputImpl(
|
||||
React.useImperativeHandle(ref, () => ({
|
||||
focus: () => {}, // TODO
|
||||
blur: () => {}, // TODO
|
||||
getCursorPosition: () => {
|
||||
const pos = editor?.state.selection.$anchor.pos
|
||||
return pos ? editor?.view.coordsAtPos(pos) : undefined
|
||||
},
|
||||
}))
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user