Skip to content

Commit 3b6ee4b

Browse files
Do not inject a #app-navigation-toggle if there is already one
This allows apps to ship their own, as in some cases the #app-content element does not exist on page load and therefore the injection fails and the icon is missing afterwards. Fixes #14956 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent 2339e94 commit 3b6ee4b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

core/js/js.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,10 @@ function initCore() {
12021202
minDragDistance: 100
12031203
});
12041204

1205-
$('#app-content').prepend('<div id="app-navigation-toggle" class="icon-menu" style="display:none;" tabindex="0"></div>');
1205+
// Add app nav toggle only if it's not provided by the app
1206+
if (!$('#app-navigation-toggle').length) {
1207+
$('#app-content').prepend('<div id="app-navigation-toggle" class="icon-menu" style="display:none;" tabindex="0"></div>');
1208+
}
12061209

12071210
var toggleSnapperOnButton = function(){
12081211
if(snapper.state().state == 'left'){

0 commit comments

Comments
 (0)