Skip to content

Commit

Permalink
fix: Content moves out of editor with max-height #1681
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Mar 2, 2018
1 parent 68dcf5a commit fc681f8
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions src/components/editor/QEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,24 @@ export default {
})
})
return k
},
innerStyle () {
return this.inFullscreen
? this.contentStyle
: [
{
minHeight: this.minHeight,
height: this.height,
maxHeight: this.maxHeight
},
this.contentStyle
]
},
innerClass () {
return [
this.contentClass,
{ col: this.inFullscreen, 'overflow-auto': this.inFullscreen || this.maxHeight }
]
}
},
data () {
Expand Down Expand Up @@ -310,13 +328,8 @@ export default {
{
ref: 'content',
staticClass: `q-editor-content`,
style: this.inFullscreen
? this.contentStyle
: [{ minHeight: this.minHeight, height: this.height, maxHeight: this.maxHeight }, this.contentStyle],
class: [
this.contentClass,
{ col: this.inFullscreen, 'overflow-auto': this.inFullscreen }
],
style: this.innerStyle,
class: this.innerClass,
attrs: { contenteditable: this.editable },
on: {
input: this.onInput,
Expand Down

0 comments on commit fc681f8

Please sign in to comment.