Skip to content

Commit 708491a

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 d1e4d61 commit 708491a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/js/js.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,9 @@ function initCore() {
11921192
setTimeout(resizeMenu, 0);
11931193

11941194
// just add snapper for logged in users
1195-
if($('#app-navigation').length && !$('html').hasClass('lte9')) {
1195+
// and if the app doesn't handle the nav slider itself
1196+
if($('#app-navigation').length && !$('html').hasClass('lte9')
1197+
&& !$('#app-content').hasClass('no-snapper')) {
11961198

11971199
// App sidebar on mobile
11981200
var snapper = new Snap({
@@ -1202,6 +1204,7 @@ function initCore() {
12021204
minDragDistance: 100
12031205
});
12041206

1207+
12051208
$('#app-content').prepend('<div id="app-navigation-toggle" class="icon-menu" style="display:none;" tabindex="0"></div>');
12061209

12071210
var toggleSnapperOnButton = function(){

0 commit comments

Comments
 (0)