[Resolved] Mobile Menu not working

Home Forums Support [Resolved] Mobile Menu not working

Home Forums Support Mobile Menu not working

Viewing 8 posts - 31 through 38 (of 38 total)
  • Author
  • #1538458

    Yes, I found the culprit. I have an element named:

    JS: Passive Event Listeners

    That is conflicting. When I turn this to Draft the menus work fine.


    Here is the script that conflicts with the menus:

    (function() {
    var supportsPassive = eventListenerOptionsSupported();

    if (supportsPassive) {
    var addEvent = EventTarget.prototype.addEventListener;

    function overwriteAddEvent(superMethod) {
    var defaultOptions = {
    passive: true,
    capture: false

    EventTarget.prototype.addEventListener = function(type, listener, options) {
    var usesListenerOptions = typeof options === ‘object’;
    var useCapture = usesListenerOptions ? options.capture : options;

    options = usesListenerOptions ? options : {};
    options.passive = options.passive !== undefined ? options.passive : defaultOptions.passive;
    options.capture = useCapture !== undefined ? useCapture : defaultOptions.capture;

    superMethod.call(this, type, listener, options);

    function eventListenerOptionsSupported() {
    var supported = false;
    try {
    var opts = Object.defineProperty({}, ‘passive’, {
    get: function() {
    supported = true;
    window.addEventListener(“test”, null, opts);
    } catch (e) {}

    return supported;

    Customer Support

    I’m not sure what the script is supposed to do.

    Where did you get it from? Is it still needed?

    and am I correct to assume that the other topic is resolved as well?


    I’m sure it is the same issue. I added passive listeners because of this



    I already know how GeneratePress works and already troubled shooted my plugins, but then I forget to look at the Elements and check them for conflicts. I am so sorry.

    Customer Support

    I don’t think you need that snippet – it’s never a good idea to add random snippets you found online without understanding how it works and the conflicts it could cause.

    I’ll close both topics now.


    It is not a random script. It is useful if someone is trying to use Elementor Pro. I was seduced by Elementor Pro last week, but then came back to my senses. I know longer use it so I do not have a use for that script anymore. But it was not random.

    Thank you for your time.

    Customer Support
Viewing 8 posts - 31 through 38 (of 38 total)
  • The topic ‘Mobile Menu not working’ is closed to new replies.