trigger event after setCurrentLayout is done in omega-mediaqueries.js

Created on 27 March 2012, over 12 years ago
Updated 27 March 2023, over 1 year ago

This is needed to calculate the page sizes correct by javascript and apply scroll events or somthing like this.

I tested it to replace the folowing:

        $(window).bind('resize.omegamediaqueries', function () {
          setCurrentLayout(dummy.css('z-index'));
        }).load(function () {
          $(this).trigger('resize.omegamediaqueries');
        });

by

        $(window).bind('resize.omegamediaqueries', function () {
          setCurrentLayout(dummy.css('z-index'));
          $(this).trigger('resize.omegamediaqueries.done');
        }).load(function () {
          $(this).trigger('resize.omegamediaqueries');
        });

For me this works fine and I got no longer race conditions between load event and the manipulation of the media query classes.

Thank you.

BR Thomas

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany protractor

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024