Closed liquid-a closed 4 years ago
mmenu in general is not compatible with IE 11. There is a PR for automatically including Polyfills though: #40 I'll release it as 3.1.0 today.
The problem here is with
document.addEventListener(
"DOMContentLoaded", () => {
new Mmenu('#<?= $this->elementId ?>', <?= json_encode($this->options) ?>, <?= json_encode($this->configuration) ?>);
},
);
being the js-template for loading the menu. Why not simply use function() {} instead of () => {} not working in IE11?
Also the trailing comma leads to a syntax error in IE11. So the more compatible version would be:
document.addEventListener(
"DOMContentLoaded", function() {
new Mmenu('#<?= $this->elementId ?>', <?= json_encode($this->options) ?>, <?= json_encode($this->configuration) ?>);
}
);
Yeah, I can optimize this. Also it was a mistake to call the template js_mmenu
, as it is not a JavaScript Template that can be included in the page layout.
The code is directly pulled from the documentation of mmenu btw.
Is it already working in IE11. i just implemented the module and activated the polyfill, but the navigation is jut thrown on the page and the trigger doesn't work.
@operatorone the problems mentioned by @Defcon0 have not been fixed yet.
@fritzmg Do you know, when you can fix this?
@contaoacademy pls create a justom js_mmenu
template and replace
with:
document.addEventListener(
"DOMContentLoaded", function() {
new Mmenu('#<?= $this->elementId ?>', <?= json_encode($this->options) ?>, <?= json_encode($this->configuration) ?>);
}
);
If this change works, then I'll change it immediately.
I get this error
After using the polyfill option the fix works.
@contaoacademy pls create a justom
js_mmenu
template and replace
I have a script Error when i usw the mmenu.js with version 3.0.1 or 3.0.2
The console shows: SCRIPT1002: Syntaxfehler Datei: mmenu.js, Zeile: 1, Spalte: 2278
The menu is not functional with IE 11. No Problems with Firefox or Chrome.
When i use Verison 2.1.1 everything ist O.K.