From b0987b2543ef666091d994c1e9101a2f4bba02c3 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 5 Apr 2019 15:41:12 +0200 Subject: [PATCH] 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 https://github.com/nextcloud/server/issues/14956 Signed-off-by: Christoph Wurst --- core/js/js.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/js/js.js b/core/js/js.js index e8a366103a146..5429aaf1a558a 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1617,7 +1617,9 @@ function initCore() { setTimeout(resizeMenu, 0); // just add snapper for logged in users - if($('#app-navigation').length && !$('html').hasClass('lte9')) { + // and if the app doesn't handle the nav slider itself + if($('#app-navigation').length && !$('html').hasClass('lte9') + && !$('#app-content').hasClass('no-snapper')) { // App sidebar on mobile var snapper = new Snap({