aitoss / Anubhav-frontend-23

Anubhav: Experience Sharing Point (A-ESP) is a platform developed for AITians to read & share encounters of various interviews.
https://anubhav.aitoss.club/
MIT License
4 stars 12 forks source link

Issue 36: Scroll inside text editor not working #46

Closed Ravijhabit closed 4 days ago

Ravijhabit commented 4 days ago

fix: handled event bubbling for ReactQuill component by event listeners on wheel event.

Issue: event bubbling scrollbar - parent element scrollbar override the behavior of child element scrollbar

Fix:

  1. Added event listeners on wheel event when textEditor component is mounted.
  2. Cleared the event listener in cleanup function.

Logic handled in event listener function:

  1. When we are the top/bottom of the child element then don't initiate the scroll function.
  2. stopPropagation to handle parent scrollbar overriding behavior while textEditor is focused.

screen-capture.webm

vercel[bot] commented 4 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
anubhav-frontend-23 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 5:25pm