Skip to content

Commit

Permalink
🐛 Freeze body overflow when opening a Popup embed (baptisteArno#937)
Browse files Browse the repository at this point in the history
fix baptisteArno#763
/claim baptisteArno#763

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
### Summary by CodeRabbit

- **Enhancement**: Improved the visibility management of the bot in the
popup. This update ensures a smoother and more intuitive user experience
when interacting with the bot.
- **Bug Fix**: Resolved an issue where certain styles could interfere
with the bot's visibility in the popup. The update prioritizes the
necessary style settings, ensuring the bot's visibility is maintained as
expected, regardless of other conflicting styles.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
Rishi Raj Jain authored and jmgoncalves97 committed Jan 17, 2025
1 parent 616c07d commit aa53037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/embeds/js/src/features/popup/components/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const Popup = (props: PopupProps) => {
const openBot = () => {
setIsBotOpened(true)
popupProps.onOpen?.()
document.body.style.overflow = 'hidden'
document.body.style.setProperty('overflow', 'hidden', 'important')
document.addEventListener('pointerdown', closeBot)
}

Expand Down

0 comments on commit aa53037

Please sign in to comment.