editor: prevent error when right clicking on widget from inspector field

This commit is contained in:
jean-emmanuel 2021-12-13 13:25:36 +01:00
parent 55502844c7
commit 14604b9d5a

View file

@ -35,12 +35,12 @@ var handleClick = function(event) {
}
if (event.type !== 'fast-right-click') {
if (editor.inspector.focusedInput) {
editor.inspector.onChange()
if (!document.body.contains(eventData.target)) return
}
if (editor.inspector.focusedInput) {
editor.inspector.onChange()
if (!document.body.contains(eventData.target)) return
}
if (event.type !== 'fast-right-click') {
if (targetWidget.getProp('type') === 'tab') {
targetWidget.parent.setValue(targetWidget.parent.children.indexOf(targetWidget), {sync: true, send: true})