refs #1316 Switch overflow style for emoji picker
This commit is contained in:
parent
aa406143a2
commit
62f24a8259
|
@ -5,6 +5,7 @@
|
||||||
:before-close="closeConfirm"
|
:before-close="closeConfirm"
|
||||||
width="400px"
|
width="400px"
|
||||||
class="new-toot-modal"
|
class="new-toot-modal"
|
||||||
|
ref="dialog"
|
||||||
>
|
>
|
||||||
<el-form v-on:submit.prevent="toot" role="form">
|
<el-form v-on:submit.prevent="toot" role="form">
|
||||||
<div class="spoiler" v-show="showContentWarning">
|
<div class="spoiler" v-show="showContentWarning">
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
:height="statusHeight"
|
:height="statusHeight"
|
||||||
@paste="onPaste"
|
@paste="onPaste"
|
||||||
@toot="toot"
|
@toot="toot"
|
||||||
|
@pickerOpened="pickerOpened"
|
||||||
/>
|
/>
|
||||||
</el-form>
|
</el-form>
|
||||||
<Poll
|
<Poll
|
||||||
|
@ -403,8 +405,18 @@ export default {
|
||||||
this.pollExpire = obj
|
this.pollExpire = obj
|
||||||
},
|
},
|
||||||
handleResize(event) {
|
handleResize(event) {
|
||||||
const pollHeight = this.$refs.poll ? this.$refs.poll.$el.offsetHeight : 0
|
const style = this.$refs.dialog.$el.firstChild.style
|
||||||
this.statusHeight = event.height - 63 - 54 - this.$refs.preview.offsetHeight - pollHeight
|
if (style.overflow === '' || style.overflow === 'hidden') {
|
||||||
|
const pollHeight = this.$refs.poll ? this.$refs.poll.$el.offsetHeight : 0
|
||||||
|
this.statusHeight = event.height - 63 - 54 - this.$refs.preview.offsetHeight - pollHeight
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickerOpened(open) {
|
||||||
|
if (open) {
|
||||||
|
this.$refs.dialog.$el.firstChild.style.overflow = 'visible'
|
||||||
|
} else {
|
||||||
|
this.$refs.dialog.$el.firstChild.style.overflow = 'hidden'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,6 +428,7 @@ export default {
|
||||||
background-color: #f2f6fc;
|
background-color: #f2f6fc;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
resize: both;
|
resize: both;
|
||||||
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
|
@ -509,7 +522,6 @@ export default {
|
||||||
background-color: #f2f6fc;
|
background-color: #f2f6fc;
|
||||||
font-size: var(--base-font-size);
|
font-size: var(--base-font-size);
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
.upload-image {
|
.upload-image {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
|
@ -251,9 +251,11 @@ export default {
|
||||||
},
|
},
|
||||||
toggleEmojiPicker() {
|
toggleEmojiPicker() {
|
||||||
this.openEmojiPicker = !this.openEmojiPicker
|
this.openEmojiPicker = !this.openEmojiPicker
|
||||||
|
this.$emit('pickerOpened', this.openEmojiPicker)
|
||||||
},
|
},
|
||||||
hideEmojiPicker() {
|
hideEmojiPicker() {
|
||||||
this.openEmojiPicker = false
|
this.openEmojiPicker = false
|
||||||
|
this.$emit('pickerOpened', this.openEmojiPicker)
|
||||||
},
|
},
|
||||||
selectEmoji(emoji) {
|
selectEmoji(emoji) {
|
||||||
const current = this.$refs.status.selectionStart
|
const current = this.$refs.status.selectionStart
|
||||||
|
@ -341,8 +343,8 @@ export default {
|
||||||
|
|
||||||
.emoji-picker {
|
.emoji-picker {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 32px;
|
top: 0;
|
||||||
left: 240px;
|
right: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue