clone: don't copy resizable/draggable class to prevent editor error (#249)

This commit is contained in:
jean-emmanuel 2018-03-18 22:03:55 +01:00
parent 9b10f245c0
commit 6af3b03b64
2 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 0.27.1
- bug fixes
- prevent error when resizing a widget and its clone(s) at the same time
## 0.27.0
- bug fixes

View file

@ -3,6 +3,8 @@ var Widget = require('../common/widget'),
resize = require('../../events/resize'),
parser = require('../../parser')
var excludedCloneClasses = ['widget', 'absolute-position', 'ui-resizable', 'ui-draggable']
class Clone extends Widget {
static defaults() {
@ -120,7 +122,7 @@ class Clone extends Widget {
this.cleanClone()
this.cloneClass = [...this.cloneTarget.container.classList].filter(i => i !== 'absolute-position' && i !== 'widget')
this.cloneClass = [...this.cloneTarget.container.classList].filter(i => excludedCloneClasses.indexOf(i) === -1)
this.container.classList.remove('empty')
this.container.classList.add(...this.cloneClass)