Giter VIP home page Giter VIP logo

Comments (5)

meandmax avatar meandmax commented on May 18, 2024

@bgold0 Could you figure out which browser event we would should listen to? Then I can imagine also resetting idleTime when scrolling overflow.

from browser-interaction-time.

meandmax avatar meandmax commented on May 18, 2024

The events in the link are the events we currently listen to:
https://github.com/atlassian/browser-interaction-time/blob/master/src/browser-interaction-time.ts#L50-L58

from browser-interaction-time.

 avatar commented on May 18, 2024

@meandmax I think you should check for scrolling on any child element as well. Like so:

document.addEventListener('scroll', this.aFunction, true);

Notice the , true) at the end.

I was able to solve it by adding my own listener and using browserInteractionTime.resetIdleTime() but knowing if a user scrolls on anything inside the window would probably be more efficient.

from browser-interaction-time.

meandmax avatar meandmax commented on May 18, 2024

I totally agree! That's a good feature and I will add that, I could think of 2 options API wise:

  1. We allow passing an element or an array of elements where we will attach listeners to.
  2. We use the option that you said above, I guess it is the useCapture option, correct?

What do you think?

from browser-interaction-time.

meandmax avatar meandmax commented on May 18, 2024

🎉 This issue has been resolved in version 2.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

from browser-interaction-time.

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.