Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/web.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web.umd.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/features/bubble/components/Bubble.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createSignal, Show, splitProps, onCleanup, createEffect, onMount } from 'solid-js';
import { createSignal, Show, splitProps, onCleanup, onMount } from 'solid-js';
import styles from '../../../assets/index.css';
import { BubbleButton } from './BubbleButton';
import { BubbleParams } from '../types';
Expand Down Expand Up @@ -88,15 +88,15 @@ export const Bubble = (props: BubbleProps) => {
};

// Add viewport meta tag dynamically
createEffect(() => {
onMount(() => {
const meta = document.createElement('meta');
meta.name = 'viewport';
meta.content = 'width=device-width, initial-scale=1.0, interactive-widget=resizes-content';
document.head.appendChild(meta);

return () => {
onCleanup(() => {
document.head.removeChild(meta);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using document.head.removeChild(meta) can throw a NotFoundError DOMException if the meta tag has already been removed or detached from the document head by another script or parent container cleanup. Using meta.remove() is a safer, more defensive alternative that gracefully handles cases where the element is no longer in the DOM.

Suggested change
document.head.removeChild(meta);
meta.remove();

};
});
});

const showTooltip = bubbleProps.theme?.tooltip?.showTooltip ?? false;
Expand Down