WickyNilliams / enquire.js

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

Events are not fired on android native browser (4.1.2) #139

Closed darekodz closed 7 years ago

darekodz commented 8 years ago

Sony Xperia S: events are not fired on android native browser (4.1.2)

Config: enquire.register("(orientation: portrait)", {

// OPTIONAL
// If supplied, triggered when a media query matches.
match : function() {alert("portrait")},      

// OPTIONAL
// If supplied, triggered when the media query transitions 
// *from a matched state to an unmatched state*.
unmatch : function() {alert("landscape")},    

// OPTIONAL
// If supplied, triggered once, when the handler is registered.
setup : function() {},    

// OPTIONAL, defaults to false
// If set to true, defers execution of the setup function 
// until the first time the media query is matched
deferSetup : true,

// OPTIONAL
// If supplied, triggered when handler is unregistered. 
// Place cleanup code here
destroy : function() {}

});

ghost commented 8 years ago

Are you still having this issue or did you manage to sort this out yourself, in whatever case please do post your findings, thank you.

WickyNilliams commented 8 years ago

Are any exceptions logged? Does it support matchMedia (e.g. what happens if you alert(window.matchMedia)?

ghost commented 8 years ago

@WickyNilliams If I find a friend with device in question I will get back to this issue and post the logs. Otherwise @darekodz if you find time some logs would help this issue, thank you.

darekodz commented 8 years ago

Hi guys, I don't have this device any more. Sorry.

WickyNilliams commented 7 years ago

Closing to clean up issues. If the problem persists, please comment here