From cbcafaee1548e7b6fd08833fe6043fb167f08dc4 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sat, 8 Dec 2018 10:03:43 -0500 Subject: [PATCH] Make sure sidebar is expanded before entering walkthrough or saving (closes #5574) --- modules/modes/save.js | 3 +++ modules/ui/intro/intro.js | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/modes/save.js b/modules/modes/save.js index 52c09511c..be596bd39 100644 --- a/modules/modes/save.js +++ b/modules/modes/save.js @@ -513,6 +513,9 @@ export function modeSave(context) { mode.enter = function() { + // Show sidebar + context.ui().sidebar.expand(); + function done() { context.ui().sidebar.show(commit); } diff --git a/modules/ui/intro/intro.js b/modules/ui/intro/intro.js index 2c8368cc8..de03f835c 100644 --- a/modules/ui/intro/intro.js +++ b/modules/ui/intro/intro.js @@ -75,6 +75,11 @@ export function uiIntro(context) { var baseEntities = context.history().graph().base().entities; var countryCode = services.geocoder.countryCode; + // Show sidebar and disable the sidebar resizing button + // (this needs to be before `context.inIntro(true)`) + context.ui().sidebar.expand(); + d3_selectAll('button.sidebar-toggle').classed('disabled', true); + // Block saving context.inIntro(true); @@ -109,8 +114,6 @@ export function uiIntro(context) { callback(null, t('intro.graph.countrycode')); }; - // Disable the sidebar resizing button - d3_selectAll('button.sidebar-toggle').classed('disabled', true); d3_selectAll('#map .layer-background').style('opacity', 1);