Code Monkey home page Code Monkey logo

Comments (4)

debrianruhut avatar debrianruhut commented on May 26, 2024 1

You can check the code that caused the problem here --> click touchstart:

  // This will hide sidebar when it's clicked outside of it
  $(document).on('click touchstart', function(e){
    // e.stopPropagation();
    e.preventDefault();

    // closing left sidebar
    if($('body').hasClass('show-left')) {
      var targ = $(e.target).closest('.br-sideleft').length;
      if(!targ) {
        $('body').removeClass('show-left');
      }
    }

    // closing right sidebar
    if($('body').hasClass('show-right')) {
      var targ = $(e.target).closest('.br-sideright').length;
      if(!targ) {
        $('body').removeClass('show-right');
      }
    }
  });

Option 1:
Instead of using click change it to mousedown... maybe the long delay is the difference between mousedown and mouseup which is how a click is determined.

Option 2:
Instead of using e.stopPropagation() change it to e.preventDefault().

You can read more at https://stackoverflow.com/questions/5963669/whats-the-difference-between-event-stoppropagation-and-event-preventdefault

from driver.js.

qq869217311 avatar qq869217311 commented on May 26, 2024

How to get the event that users click to close

from driver.js.

qq869217311 avatar qq869217311 commented on May 26, 2024

Onreset will be triggered due to page Jump,
Cannot directly process shutdown events in onreset

from driver.js.

kamranahmedse avatar kamranahmedse commented on May 26, 2024

We just released v1.0 of driver.js which has been rewritten from the ground up. There are more simplified hooks which give you more control over the popover and the whole lifecycle. Please have a look at the docs and do let me know if you face any issues.

from driver.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.