Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

CTB modal disabling body scroll on second open #169

Merged
merged 3 commits into from
Jul 27, 2022

Conversation

wpalani
Copy link
Member

@wpalani wpalani commented Jul 26, 2022

Proposed changes

Properly set and unset 'noscroll' class to body on CTB modal open/close.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Properly set and unset 'noscroll' class to body on CTB modal open/close
@circlecube circlecube requested review from earnjam and wpscholar July 26, 2022 21:44
@circlecube
Copy link
Member

Nice fix Al Ani, I hadn't noticed you'd fixed this already. I had done basically the same thing, but I moved these classList adjustments closer to where the modal opens and closes.

I haven't yet tested this on a live site to make sure it fixes the issue though.

@circlecube
Copy link
Member

Just tested, and this doens't seem to fix it still - especially if we open the modal and close it real quick. Can dig in more tomorrow.

@wpalani
Copy link
Member Author

wpalani commented Jul 26, 2022

Just tested, and this doens't seem to fix it still - especially if we open the modal and close it real quick. Can dig in more tomorrow.

Hey Evan, I was getting inconsistent results until I purged the cache, could that be it?
https://www.berrycast.com/conversations/69beed89-8358-5d5f-988e-08085421316a

…vent default so links don't open if they have a fallback href.
@circlecube circlecube merged commit 5b7570e into master Jul 27, 2022
@circlecube circlecube deleted the fix/ctb-modal-body-scroll-bug branch July 27, 2022 16:27
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants