🐛 Freeze body overflow when opening a Popup embed (#937)
fix #763 /claim #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 -->
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user