File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ const dropDownElements = document.querySelectorAll('.dropdown');
121121const getDegreeElement = getRange ( 'animation' ) ;
122122const getRadioButtonSetElement = getRadioButtonSet ( 'animation' ) ;
123123const getDurationElement = getInputSpinner ( 'animation' ) ;
124+ const events = [ "dragover" , "drop" ] ;
125+
124126if ( openSidePanelButton ) {
125127 openSidePanelButton . style . display = 'none' ;
126128}
@@ -306,7 +308,7 @@ function showOpenPreviousResultText() {
306308 getOpenPreviousResult . style . animationFillMode = 'backwards' ;
307309}
308310
309- // clicking outside the nav bar should close the nav abr
311+ // clicking outside the nav bar should close the nav bar
310312document . addEventListener ( 'click' , ( e : Event ) => {
311313 const event = e . target as HTMLElement ;
312314
@@ -330,6 +332,13 @@ document.addEventListener('click', (e: Event) => {
330332 }
331333} ) ;
332334
335+ // Disable file opening in browser
336+ for ( let event of events ) {
337+ document . addEventListener ( event , ( e ) => {
338+ e . preventDefault ( ) ;
339+ } )
340+ }
341+
333342// clicking on the menu icon should close the nav bar
334343menuIcon ?. addEventListener ( 'click' , ( ) => {
335344 if ( navBar ?. classList . contains ( 'closed-nav' ) ) {
You can’t perform that action at this time.
0 commit comments