fix: Avoid overflow caused by the empty span element (#9753)

This PR addresses an issue with the `createNotificationBubble` function, which generates an empty `span` element with the class `woot--notification`. This `span` element is currently not utilized anywhere in the code and lacks associated CSS, leading to an overflow issue, specifically in the Firefox browser. It solves the website overflow issue by removing this unused `span` element. This change is unrelated to the unread notification dot, which is working as before.

Fixes https://linear.app/chatwoot/issue/PR-1098/missing-css-for-woot-notification-div
This commit is contained in:
Sivin Varghese
2024-07-11 08:26:46 +05:30
committed by GitHub
parent 9de8c27368
commit abf376940d
2 changed files with 0 additions and 7 deletions

View File

@@ -14,7 +14,6 @@ import {
chatBubble, chatBubble,
closeBubble, closeBubble,
bubbleHolder, bubbleHolder,
createNotificationBubble,
onClickChatBubble, onClickChatBubble,
onBubbleClick, onBubbleClick,
setBubbleText, setBubbleText,
@@ -315,7 +314,6 @@ export const IFrameHelper = {
bubbleHolder.appendChild(chatIcon); bubbleHolder.appendChild(chatIcon);
bubbleHolder.appendChild(closeBubble); bubbleHolder.appendChild(closeBubble);
bubbleHolder.appendChild(createNotificationBubble());
onClickChatBubble(); onClickChatBubble();
}, },
toggleCloseButton: () => { toggleCloseButton: () => {

View File

@@ -65,11 +65,6 @@ export const createBubbleHolder = hideMessageBubble => {
body.appendChild(bubbleHolder); body.appendChild(bubbleHolder);
}; };
export const createNotificationBubble = () => {
addClasses(notificationBubble, 'woot--notification');
return notificationBubble;
};
export const onBubbleClick = (props = {}) => { export const onBubbleClick = (props = {}) => {
const { toggleValue } = props; const { toggleValue } = props;
const { isOpen } = window.$chatwoot; const { isOpen } = window.$chatwoot;