WickyNilliams / enquire.js

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

Conflict between enquire.js and tinyMCE in Firefox responsive design view #108

Closed oilvier closed 10 years ago

oilvier commented 10 years ago

Hi,

First of all, sorry to bother you with this issue, which in my opinion is not specifically a real issue.

I just found out that enquire.js "match" and "unmatch" functions are not fired when in the following situation :

There is no error, nothing happens, and I can't figure out why.

The "match" function is triggered on load (if the window size matches) but after that there is no change.

Everything works fine if the browser window is resized directly.

You can see the bug on this JSfiddle : http://fiddle.jshell.net/oilvier/8G2NY/13/show/light/ (remember to watch this in Firefox with responsive design view, otherwise it will work fine)

I know this is a very specific issue, and that nobody will face it in live situation, but I've lost a couple hours trying to find out why my function wasn't working (while it was indeed working!) and if you have any idea where it come from, I'd really appreciate your feedback.

If you don't have the time to watch it, I'd totally understand! Thanks for your time

danbruegge commented 10 years ago

I had the same issue with RDW. My entire workflow to test responsive sites rely on the RDW.

I would love to see that this can be fixed.

rolka commented 10 years ago

Just found that enquire.js doesn't work on Chrome Dev Tools Emulation. Chrome 34.0.1847.116 m

WickyNilliams commented 10 years ago

I think TinyMCE is a red herring here. This is an issue not with enquire but with the responsive design view itself. Someone raised this issue previously (PLEASE search the issues before posting!) and we were able to reproduce the bug using just the underlying matchMedia API (i.e. no enquire). A bug was raised in the bugzilla ticketing system describing the issue, and I guess it hasn't been fixed yet.

I'm going to close this issue

oilvier commented 10 years ago

Well, sorry for the double issue and thanks for your answer

WickyNilliams commented 10 years ago

No problems. Sorry I can't be more helpful in this instance!

WickyNilliams commented 10 years ago

If anyone is interested, the bug filed with mozilla was raised in #77: https://bugzilla.mozilla.org/show_bug.cgi?id=920379

Go vote for it if you think it's worth them fixing!

danbruegge commented 10 years ago

With Firefox 29 and RDW it will on the Demo Page: https://rawgit.com/scottjehl/Respond/master/test/test.html