WickyNilliams / enquire.js

Awesome Media Queries in JavaScript
http://wicky.nillia.ms/enquire.js/
MIT License
3.62k stars 269 forks source link

No event when changing from desktop to tablet #119

Closed binarykitchen closed 7 years ago

binarykitchen commented 10 years ago

It looks like match() is never called when I resize the window from desktop down to tablet. This is my configuration:

enquire.register("all and (min-width: 980px)"), {
    match: function() {
        // Code for desktop
    }
});

enquire.register("all and (min-width: 650px)"), {
    match: function() {
       // Code for tablets 
    }
});

enquire.register("all and (max-width: 649px)"), {
    match: function() {
       // Code for mobile 
    }
});

When I resize from i.E. 1000px to 700px, the tablet handler is never called. But when I resize from 200px for mobile to 700px, then the tablet handler is called. Weird. Any ideas why?

WickyNilliams commented 7 years ago

I'm cleaning up old issues. I'm going to delete this as I assume it's no longer an issue. If the problem still persists, please comment here.