forked from Mirrors/gomuks
web/emojipicker: fix position above composer
This commit is contained in:
parent
daa0ce722d
commit
cee4e2f347
2 changed files with 8 additions and 4 deletions
|
@ -445,10 +445,14 @@ const MessageComposer = () => {
|
|||
evt.stopPropagation()
|
||||
roomCtx.setEditing(null)
|
||||
}, [roomCtx])
|
||||
const getEmojiPickerStyle = () => ({
|
||||
bottom: (composerRef.current?.clientHeight ?? 32) + 4 + 24,
|
||||
right: "var(--timeline-horizontal-padding)",
|
||||
})
|
||||
const openEmojiPicker = useEvent(() => {
|
||||
openModal({
|
||||
content: <EmojiPicker
|
||||
style={{ bottom: (composerRef.current?.clientHeight ?? 32) + 2, right: "1rem" }}
|
||||
style={getEmojiPickerStyle()}
|
||||
room={roomCtx.store}
|
||||
onSelect={(emoji: PartialEmoji) => setState({
|
||||
text: state.text.slice(0, textInput.current?.selectionStart ?? 0)
|
||||
|
@ -462,7 +466,7 @@ const MessageComposer = () => {
|
|||
const openGIFPicker = useEvent(() => {
|
||||
openModal({
|
||||
content: <GIFPicker
|
||||
style={{ bottom: (composerRef.current?.clientHeight ?? 32) + 2, right: "1rem" }}
|
||||
style={getEmojiPickerStyle()}
|
||||
room={roomCtx.store}
|
||||
onSelect={media => setState({ media })}
|
||||
/>,
|
||||
|
|
|
@ -207,9 +207,9 @@ div.emoji-picker {
|
|||
|
||||
@media screen and (max-width: 37.5rem) {
|
||||
div.emoji-picker, div.gif-picker {
|
||||
inset: 0 0 40px 0 !important;
|
||||
inset: 0 0 3rem 0 !important;
|
||||
width: 100%;
|
||||
height: calc(100% - 40px);
|
||||
height: calc(100% - 3rem);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue