Facebook Feed

I have scrolling issues with the Facebook Feed widget. When the Anchor block is selected below the widget, the website immediately jumps into the widget with minimal scrolling.

Select “Contact” and scroll up slightly with the mouse wheel. The view immediately jumps into the widget.

You also cannot scroll down beyond the widget with the mouse wheel.

I would appreciate any suggestions for solutions.

1 Like

Hi there, @Alexander_Gritsch and welcome to the Community :waving_hand:

I am so sorry about this inconvenience!

I’ve forwarded this issue to the devs and will let you know once I have any news :slightly_smiling_face:

1 Like

Hi there, @Alexander_Gritsch :waving_hand:

We’ve fixed the issue by adding this code to the Custom JS field on the More tab of your widget’s settings:

const waitForElement = (selector, root = document) => new Promise(res => {
  let i = 0;

  const check = () => {
      const component = root.querySelector(selector);

      if (component) {
          res(component);
      } else if (i !== 50) {
          setTimeout(check, 100);
          i++;
      }
  };

  check();
});

waitForElement(".eapps-facebook-feed-posts-item-content-picture-visible").then(() => {
  const event = new CustomEvent("np.responsive.init", {
      detail: {
          mode: "XL",
          prevMode: ""
      }
  });
  
  setTimeout(() => document.dispatchEvent(event), 100);
});

Please check your website and let me know if everything is fine now :slightly_smiling_face:

1 Like

Hi,
yes, great, thanks…it works