Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-85741

Liferay lazyLoad doesn't work in Firefox

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: Master
    • Fix Version/s: None
    • Labels:
      None

      Description

      Using lazyLoad doesn't work in Firefox but Liferay require works like a charm.

      For example:

      This doesn't work

      Liferay.Util.openToast = Liferay.lazyLoad(
        'frontend-js-web/liferay/toast/commands/OpenToast.es',
          function(toastCommands, ...args) {
            toastCommands.openToast(...args);
          }
      ); 
      

      This works

      Liferay.Util.openToast = (...args) => {
        Liferay.Loader.require(
            'frontend-js-web/liferay/toast/commands/OpenToast.es',
            commands => {
                commands.openToast(...args)
            }
        );
      };
      

      Tested in Firefox 62.0

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 4 weeks, 1 day ago

                Packages

                Version Package