editor: remove attempt to add multi select to keyboard navigation

This commit is contained in:
jean-emmanuel 2018-10-10 15:47:17 +02:00
parent 5621ba3d13
commit 78a5d496ab

View file

@ -142,7 +142,7 @@ var Editor = class Editor {
else if((e.key == 'ArrowLeft') || (e.key == 'ArrowRight')){
const toSelectList = curWidget.parent.childrenHashes
.map(h=>widgetManager.widgets[h])
.filter(w=>w && w.parent==curWidget.parent && (!e.shiftKey || !this.selectedWidgets.includes(w)))
.filter(w=>w && w.parent==curWidget.parent)
if(toSelectList && toSelectList.length){
toSelectList.sort((a,b)=>a.container.offsetLeft>b.container.offsetLeft)
const idx = toSelectList.findIndex(e=>e.hash===curWidget.hash)
@ -154,7 +154,7 @@ var Editor = class Editor {
}
if(toSelect){
this.select(toSelect, {multi: e.shiftKey})
this.select(toSelect)
}
})