Skip to content

Commit 3f1a4d2

Browse files
committed
fix(QFile): readonly accepts drag'n'drop
1 parent 573fcff commit 3f1a4d2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

ui/src/components/file/QFile.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,22 @@ export default Vue.extend({
120120
},
121121

122122
__getControl (h) {
123-
return h('div', {
123+
const data = {
124124
ref: 'target',
125125
staticClass: 'q-field__native row items-center cursor-pointer',
126126
attrs: {
127127
tabindex: this.tabindex
128-
},
129-
on: cache(this, 'native', {
128+
}
129+
}
130+
131+
if (this.editable === true) {
132+
data.on = cache(this, 'native', {
130133
dragover: this.__onDragOver,
131134
keyup: this.__onKeyup
132135
})
133-
}, [ this.__getInput(h) ].concat(this.__getSelection(h)))
136+
}
137+
138+
return h('div', data, [ this.__getInput(h) ].concat(this.__getSelection(h)))
134139
},
135140

136141
__getControlChild (h) {

0 commit comments

Comments
 (0)