File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -90,22 +90,25 @@ export default {
9090 },
9191 setEmojiPickerPosition (clientY , innerWidth , innerHeight ) {
9292 setTimeout (() => {
93+ const mobileSize = innerWidth < 500 || innerHeight < 700
94+
9395 if (! this .roomFooterRef ) {
94- if (innerWidth < 500 ) this .emojiPickerRight = ' 0px'
96+ if (mobileSize ) this .emojiPickerRight = ' 0px'
9597 return
9698 }
9799
98- if (innerHeight < 700 ) this .emojiPickerHeight = innerHeight / 2
99- const roomFooterTop = this .roomFooterRef .getBoundingClientRect ().top
100- const pickerTopPosition =
101- roomFooterTop - clientY > this .emojiPickerHeight - 50
100+ if (mobileSize) {
101+ this .emojiPickerRight = innerWidth / 2 - 120 + ' px'
102+ this .emojiPickerTop = 100
103+ this .emojiPickerHeight = innerHeight - 200
104+ } else {
105+ const roomFooterTop = this .roomFooterRef .getBoundingClientRect ().top
106+ const pickerTopPosition =
107+ roomFooterTop - clientY > this .emojiPickerHeight - 50
102108
103- if (pickerTopPosition) this .emojiPickerTop = clientY + 10
104- else this .emojiPickerTop = clientY - this .emojiPickerHeight - 10
109+ if (pickerTopPosition) this .emojiPickerTop = clientY + 10
110+ else this .emojiPickerTop = clientY - this .emojiPickerHeight - 10
105111
106- if (innerWidth < 500 && ! this .positionRight ) {
107- this .emojiPickerRight = innerWidth / 5 + ' px'
108- } else {
109112 this .emojiPickerRight = this .positionTop
110113 ? ' -50px'
111114 : this .positionRight
Original file line number Diff line number Diff line change @@ -584,7 +584,6 @@ export default {
584584}
585585
586586.room-header {
587- position : absolute ;
588587 display : flex ;
589588 align-items : center ;
590589 height : 64px ;
You can’t perform that action at this time.
0 commit comments