Search code examples
javascriptfirefoximpress.js

Impress.js + Firefox: How to disable advance slide on mouse click


Impress.js works great in Chrome, but unfortunately, it's somewhat buggy in Firefox.  The biggest problem that I am having is that, in Firefox, the slideshow advances to the next slide on every mouse click.  Does anybody know of a way to disable this functionality?


Solution

  • Go to js/impress.js, delete the code below (about line 783~797) , it listen the click event:

        // Delegated handler for clicking on step elements
        document.addEventListener( "click", function( event ) {
            var target = event.target;
    
            // Find closest step element that is not active
            while ( !( target.classList.contains( "step" ) &&
                      !target.classList.contains( "active" ) ) &&
                      ( target !== document.documentElement ) ) {
                target = target.parentNode;
            }
    
            if ( api.goto( target ) ) {
                event.preventDefault();
            }
        }, false );