fatihsolhan / v-onboarding

v-onboarding is a super-slim, fully-typed onboarding component for Vue 3
https://v-onboarding.fatihsolhan.com/
MIT License
164 stars 20 forks source link

`preventOverlayInteraction` doesn't remove all blocking listeners #106

Open spencerjsmall opened 2 weeks ago

spencerjsmall commented 2 weeks ago

Hi! It appears that even with preventOverlayInteraction set to false, this package still applies blocking dom listeners that prevent clicks, focusin, etc.. The following workaround works locally, however in my production app these event listeners get wrapped by sentry and I'm unable to intercept them the same:

 const originalAddEventListener = document.addEventListener;
    document.addEventListener = function (type, listener, options) {
      const listenerStr = listener.toString();
      if (
        (type === 'click' && listenerStr.includes('checkClick')) ||
        (type === 'touchstart' && listenerStr.includes('checkPointerDown')) ||
        (type === 'mousedown' && listenerStr.includes('checkPointerDown')) ||
        (type === 'keydown' && listenerStr.includes('checkKey')) ||
        (type === 'focusin' && listenerStr.includes('checkFocusIn'))
      ) {
        return;
      }
      originalAddEventListener.call(this, type, listener, options);
    };

Is there a reason these blocking dom listeners are still being added? Thank you!

spencerjsmall commented 2 weeks ago

I see now that this is from using focusTrap in the step component. In my opinion, this should be turned off if preventOverlayInteraction is false.