commercetools-docs-kit
commercetools-docs-kit copied to clipboard
Modal component and scroll event
The modal component provided by docs-kit, which is an almost 1:1 porting of the one provided in the MC ui-kit has a possible issue with the scrolling event.
If there is no component to scroll within the modal, the scroll event seems to propagate to the backgorund page (the page covered by the modal dark overlay).
This issue can be easily reproduced by opening the AI chat modal and trying to scroll when the modal is opened.
Requirements:
- when a modal is opened, the scroll event (both mouse wheel and mobile) should affect only the modal and not propagate to the background layer.
- The scroll functionality should still work as usual if any scrollable elements are displayed in the modal