GithubHelp home page GithubHelp logo

Comments (4)

tomhodgins avatar tomhodgins commented on June 14, 2024

Hi Nick! The event listener for mouseup only send EQCSS.throttle() while the mouse is down. This means click-and-drag functionality can meet EQCSS conditions before the mouseup event!

I wonder if there's a way we could make it ignore the scrollbar and only send EQCSS.throttle() if you're clicking on an element inside the page 🤔

from element-queries-spec.

scooterlord avatar scooterlord commented on June 14, 2024

Hello Tom and thanks for your reply. However, the question is, in which case scenario would this be used? Why would a user need an EQCSS trigger on mousemove?

from element-queries-spec.

tomhodgins avatar tomhodgins commented on June 14, 2024

Hi Nick!

The reason for the mousemove functionality is so that EQCSS will recalculate during times when the user is clicking and dragging elements on the page, without the browser resizing. Many of the demos on http://elementqueries.com make use of this (allowing you to click and drag until the query applies and you see it right away) or for building things like this:

I'm still looking at ways to test to see if there browser is aware whether you're clicking on the document versus a scrollbar and I've had some success, but it's hard finding a scrollbar-detecting test that works reliably in all browsers.

from element-queries-spec.

scooterlord avatar scooterlord commented on June 14, 2024

Aha, now it makes sense. I'll try to squeeze some tests as soon as I find some spare time concerning the detection of using mousedown on a scrollbar.

from element-queries-spec.

Related Issues (15)

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.