Skip to content

Commit

Permalink
fix: source editing button causes disappearing editor #87
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafaznv committed Oct 25, 2023
1 parent 7e515cd commit a0d6ff9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions resources/js/components/editor-field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ export default {
priority: 'lowest'
})
// set the height of the editor when editing
if (this.currentField.height > 1) {
editor.editing.view.change(writer => {
writer.setStyle('height', `${this.currentField.height}px`, editor.editing.view.document.getRoot());
});
}
editor.editing.view.change((writer) => {
// set the height of the editor when editing
if (this.currentField.height > 1) {
Expand Down Expand Up @@ -254,7 +247,9 @@ export default {
debounce((element) => {
const height = element[0].target.offsetHeight
writer.setStyle('height', `${height}px`, editor.editing.view.document.getRoot())
if (height > 10) {
writer.setStyle('height', `${height}px`, editor.editing.view.document.getRoot())
}
}, 100),
)
Expand Down

0 comments on commit a0d6ff9

Please sign in to comment.