diff --git a/js/animations/timeline.js b/js/animations/timeline.js index 7300d305a..61d04e090 100644 --- a/js/animations/timeline.js +++ b/js/animations/timeline.js @@ -229,6 +229,7 @@ const Timeline = { }, revealTime(time) { let body = document.getElementById('timeline_body'); + if (!body) return; var scroll = body.scrollLeft; var playhead = time * Timeline.vue._data.size + 8; if (playhead < scroll || playhead > scroll + document.getElementById('timeline_vue').clientWidth - Timeline.vue._data.head_width) { diff --git a/js/modes.js b/js/modes.js index 4468094c2..cd0fb324f 100644 --- a/js/modes.js +++ b/js/modes.js @@ -62,15 +62,17 @@ class Mode extends KeybindItem { } UVEditor.beforeMoving(); - for (let id in Panels) { - let old_pos_data = Panels[id].position_data; - Panels[id].position_data = Interface.getModeData().panels[id]; - if (!Panels[id].position_data) { - Panels[id].position_data = Interface.getModeData().panels[id] = JSON.parse(JSON.stringify(old_pos_data)) + if (!Blockbench.isMobile) { + for (let id in Panels) { + let old_pos_data = Panels[id].position_data; + Panels[id].position_data = Interface.getModeData().panels[id]; + if (!Panels[id].position_data) { + Panels[id].position_data = Interface.getModeData().panels[id] = JSON.parse(JSON.stringify(old_pos_data)) + } + Panels[id].updateSlot(); } - Panels[id].updateSlot(); + updateSidebarOrder(); } - updateSidebarOrder(); Canvas.updateRenderSides() if (this.tool && BarItems[this.tool] && Condition(BarItems[this.tool])) {