Skip to content

Instantly share code, notes, and snippets.

@hashancgx
hashancgx / rm-radix-dialog.js
Created May 21, 2026 06:03
remove radix dialog overlay from DOM
/* IIFE */
(() => {
document.body.removeChild(document.querySelector('div[role=dialog][data-state=open]'));
document.body.removeChild(document.querySelector('span[data-radix-focus-guard]'));
document.body.removeChild(document.querySelector('div[data-slot="dialog-overlay"]'));
document.body.removeAttribute('style');
document.body.removeAttribute('data-scroll-locked');
})()