Skip to content

Commit 41a5e45

Browse files
pdanpdanrstoenescu
authored andcommitted
close quasarframework#1903: Fix QEditor not emitting after ENTER (quasarframework#1949)
* close quasarframework#1903: Fix QEditor not emitting after ENTER - also fix some forgotten arrow-parens close quasarframework#1903 * Update QUploader.vue
1 parent ad7209f commit 41a5e45

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

dev/components/css/typography.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default {
155155
return this.testHeight ? ' [Apjyq]' : ''
156156
},
157157
testFonts () {
158-
return fonts.map((f) => ({ label: `Font ${f}`, value: f }))
158+
return fonts.map(f => ({ label: `Font ${f}`, value: f }))
159159
}
160160
}
161161
}

src/components/editor/QEditor.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,11 @@ export default {
234234
methods: {
235235
onInput (e) {
236236
if (this.editWatcher) {
237-
this.editWatcher = false
238-
this.$emit('input', this.$refs.content.innerHTML)
237+
const val = this.$refs.content.innerHTML
238+
if (val !== this.value) {
239+
this.editWatcher = false
240+
this.$emit('input', val)
241+
}
239242
}
240243
},
241244
onKeydown (e) {

src/components/uploader/QUploader.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,17 +338,15 @@ export default {
338338
else {
339339
const reader = new FileReader()
340340
let p = new Promise((resolve, reject) => {
341-
reader.onload = (e) => {
341+
reader.onload = e => {
342342
let img = new Image()
343343
img.src = e.target.result
344344
file.__img = img
345345
this.queue.push(file)
346346
this.__computeTotalSize()
347347
resolve(true)
348348
}
349-
reader.onerror = (e) => {
350-
reject(e)
351-
}
349+
reader.onerror = e => { reject(e) }
352350
})
353351
354352
reader.readAsDataURL(file)

src/install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function bodyInit () {
1919
Platform.is.electron && cls.push('electron')
2020

2121
if (Platform.is.ie && Platform.is.versionNumber === 11) {
22-
cls.forEach((c) => document.body.classList.add(c))
22+
cls.forEach(c => document.body.classList.add(c))
2323
}
2424
else {
2525
document.body.classList.add.apply(document.body.classList, cls)

0 commit comments

Comments
 (0)