editor: multiwidget edit field undo/redo fix

This commit is contained in:
jean-emmanuel 2018-08-23 19:37:46 +02:00
parent 9e2ba9d714
commit 32504cea66

View file

@ -93,8 +93,8 @@ module.exports = function editField(editor, widget, propName, defaultValue){
for (var w of editor.selectedWidgets) {
w.props[propName] = v !== '' ? v : JSON.parse(JSON.stringify(defaultValue))
newWidgets.push(updateWidget(w, {preventSelect: editor.selectedWidgets.length > 1}))
editor.pushHistory()
}
editor.pushHistory()
if (newWidgets.length > 1) editor.select(newWidgets)
}