editor: change capture flag name and remove tab hack (handling editor's select in capture phase makes it useless)

This commit is contained in:
jean-emmanuel 2018-02-22 17:53:10 +01:00
parent 24dd92a8e4
commit d7c6272637
4 changed files with 5 additions and 10 deletions

View file

@ -132,7 +132,8 @@ var handleClick = function(event) {
if (!widget.container.classList.contains('editing')) {
// add a flag to the original event to prevent draginit
// and prevent any further fast-click (ie input focus)
eventData.preventInterraction = true
eventData.capturedByEditor = true
event.capturedByEditor = true
}
editor.select(widget)

View file

@ -5,7 +5,7 @@ var targets = {},
function pointerDownHandler(event) {
if (event.preventInterraction === true) return
if (event.capturedByEditor === true) return
if (!event.multitouch) {
for (var i in targets) {

View file

@ -90,6 +90,7 @@ module.exports = class Modal extends Panel {
})
} else {
this.light.addEventListener('fast-click',(e)=>{
if (e.capturedByEditor === true) return
this.setValue(1, {sync:true, send:true})
})
}

View file

@ -1,11 +1,5 @@
var Panel = require('./panel'),
resize = require('../../events/resize'),
editor
setTimeout(()=>{
editor = require('../../editor/')
})
resize = require('../../events/resize')
module.exports = class Tab extends Panel {
@ -60,7 +54,6 @@ module.exports = class Tab extends Panel {
hide() {
if (this.detached) return
if (EDITING) editor.unselect()
this.container.removeChild(this.widget)
this.container.classList.remove('show')
this.detached = true