benschwarz / metaquery

A declarative responsive web design syntax. Breakpoints, defined in `<meta>`
MIT License
324 stars 25 forks source link

onBreakpointChange acting as window.resize #33

Open cerebe opened 9 years ago

cerebe commented 9 years ago

Using the following, breakpoint agnostic, syntax the handler is fired continuously on resize instead of being fired solely on breakpoint change It should behave correctly with the breakpoint naming syntax.

metaQuery.onBreakpointChange( function (activeBreakpoints) { // gets called on resize instead of just once on breakpoint change });

The solution I have to use for now is to set flags but it's a workaround that we shouldn't be facing thanks to metaQuery.