zackjohnlee / portfolioShop

artist portfolio and simple e-commerce shop
5 stars 0 forks source link

Modal Scroll Issues #4

Open zackjohnlee opened 6 years ago

zackjohnlee commented 6 years ago

The modal scroll lock is still misbehaving. when the modal is closed, the toggle does not remove the toggle class.

shanedg commented 6 years ago

@zackjohnlee you still seeing this on master? or shopping-cart-features?

zackjohnlee commented 6 years ago

@shanedgarrity its in shopping cart feature. so it only happens when i have the modifier "&& !this.state.modalOpen" in the conditional statement of the scroll toggle. that little bit is needed to prevent the toggle from flipping when the gallery is navigated. however, it prevents the class from being removed when the modal is closed, and thus flips the toggle to turn off when the modal is open, and turn on when its closed. the feature was reverted beck to just the original bug.

when I started trying to fix it i was getting all sorts of weird behavior when multiple modals were opened or closed in different orders, it was becoming unpredictable.