File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1- < details class ="group relative z-50 inline-block " data-heap-id ="markdown-dropdown ">
1+ < details id =" markdownDropdown " class ="group relative z-50 inline-block " data-heap-id ="markdown-dropdown ">
22 < summary
33 class ="inline-flex cursor-pointer items-center gap-2 rounded border border-gray-light-200 bg-gray-light-200 px-4 py-2 text-base font-semibold text-black transition-colors hover:bg-gray-light-300 dark:border-gray-dark-200 dark:bg-gray-dark-300 dark:text-white dark:hover:bg-gray-dark-400 "
44 data-heap-id ="markdown-dropdown-toggle "
100100 alert ( "Couldn't find Docs AI." ) ;
101101 }
102102 }
103+
104+ document . addEventListener ( 'click' , function ( event ) {
105+ const dropdown = document . getElementById ( 'markdownDropdown' ) ;
106+
107+ if ( ! dropdown ) return ;
108+
109+ const isClickInside = dropdown . contains ( event . target ) ;
110+
111+ // If dropdown is open and click was outside, close it
112+ if ( ! isClickInside && dropdown . hasAttribute ( 'open' ) ) {
113+ dropdown . removeAttribute ( 'open' ) ;
114+ }
115+ } ) ;
103116</ script >
You can’t perform that action at this time.
0 commit comments