editor: prevent selecting root when opening the sidepanel

This commit is contained in:
bordun 2018-08-28 12:06:06 +02:00
parent 00206b4aaf
commit 21230035ca
3 changed files with 5 additions and 1 deletions

View file

@ -2,6 +2,8 @@
## next
- bug fixes
- editor: opening the sidepanel doesn't select the root widget anymore
- widgets
- **new** `gyroscope` widget
- misc

View file

@ -124,7 +124,8 @@ var handleClick = function(event) {
if (!event.detail.ctrlKey && event.type !== 'fast-right-click' && (
event.target.classList.contains('ui-resizable-handle') ||
event.target.classList.contains('ui-draggable-handle')
event.target.classList.contains('ui-draggable-handle') ||
event.target.id === 'open-toggle'
)) { return }
var eventData = event.detail,

View file

@ -178,6 +178,7 @@ var SessionManager = class SessionManager {
this.load([{}],function(){
require('../ui/sidepanel').open()
editor.enable()
editor.select(widgetManager.getWidgetById('root'))
})
}