Allow turning off theme editor scroll mechanism

Short description of issue

Help to improve user experience

Reproduction steps

Hello,

For some sections (especially scroll-based sections), the layout can be complex and the automatic scroll to block/scroll to section functionality of the theme editor not work properly. We have such sections and we’d like to provide our own scrolling logic when a block/section is selected, but the theme editor goes into the way and break things.

It would be nice if Shopify would stop its own scrolling logic if we preventDefault the event. Example:

this.addEventListener('shopify:block:select', (event) => {
  event.preventDefault();
  window.scrollTo(); // provide our own logic
});

If Shopify detects that event.defaultPrevented, the scroll logic in the theme editor is not done.

This should work for shopify:block:select and shopify:section:select events.

Additional info

N/A

What type of topic is this

Feature request