Skip to content

Commit

Permalink
close quasarframework#1903: Fix QEditor not emitting after ENTER
Browse files Browse the repository at this point in the history
- also fix some forgotten arrow-parens

close quasarframework#1903
  • Loading branch information
pdanpdan committed Apr 17, 2018
1 parent 64404f8 commit 4bdf37d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dev/components/css/typography.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default {
return this.testHeight ? ' [Apjyq]' : ''
},
testFonts () {
return fonts.map((f) => ({ label: `Font ${f}`, value: f }))
return fonts.map(f => ({ label: `Font ${f}`, value: f }))
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/editor/QEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,11 @@ export default {
methods: {
onInput (e) {
if (this.editWatcher) {
this.editWatcher = false
this.$emit('input', this.$refs.content.innerHTML)
const val = this.$refs.content.innerHTML
if (val !== this.value) {
this.editWatcher = false
this.$emit('input', val)
}
}
},
onKeydown (e) {
Expand Down
6 changes: 2 additions & 4 deletions src/components/uploader/QUploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -346,17 +346,15 @@ export default {
else {
const reader = new FileReader()
let p = new Promise((resolve, reject) => {
reader.onload = (e) => {
reader.onload = e => {
let img = new Image()
img.src = e.target.result
file.__img = img
this.queue.push(file)
this.__computeTotalSize()
resolve(true)
}
reader.onerror = (e) => {
reject(e)
}
reader.onerror = e => reject(e)
})
reader.readAsDataURL(file)
Expand Down
2 changes: 1 addition & 1 deletion src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function bodyInit () {
Platform.is.electron && cls.push('electron')

if (Platform.is.ie && Platform.is.versionNumber === 11) {
cls.forEach((c) => document.body.classList.add(c))
cls.forEach(c => document.body.classList.add(c))
}
else {
document.body.classList.add.apply(document.body.classList, cls)
Expand Down

0 comments on commit 4bdf37d

Please sign in to comment.