input: disable focus when not editable

This commit is contained in:
jean-emmanuel 2017-10-06 09:06:06 +02:00
parent af99fcae80
commit 608f1b1311
2 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ module.exports = class Input extends _canvas_base {
var html = `
<div class="input">
<canvas tabindex="0"></canvas>
<canvas></canvas>
</div>
`
@ -56,7 +56,7 @@ module.exports = class Input extends _canvas_base {
this.stringValue = ''
if (this.getProp('editable')) {
this.canvas.attr('tabindex', 0)
this.canvas.on('focus', this.focus.bind(this))
this.input = $('<input></input>')