File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 324324 let printText = document . getElementById ( "printText" ) ;
325325 printText . classList . remove ( "show" ) ;
326326 }
327-
327+
328328 function hideErrorText ( ) {
329329 let errorText = document . getElementById ( "errorText" ) ;
330330 errorText . classList . remove ( "show" ) ;
331331 hideArrows ( ) ; // This function is declared in js/activity.js
332332 }
333+
334+ document . addEventListener ( "click" , function ( event ) {
335+ let printText = document . getElementById ( "printText" ) ;
336+ let errorText = document . getElementById ( "errorText" ) ;
337+
338+ if ( printText && printText . classList . contains ( "show" ) && ! printText . contains ( event . target ) ) {
339+ hidePrintText ( ) ;
340+ }
341+ if ( errorText && errorText . classList . contains ( "show" ) && ! errorText . contains ( event . target ) ) {
342+ hideErrorText ( ) ;
343+ }
344+ } ) ;
333345 </ script >
334346
335347 < div id ="canvasContainer ">
You can’t perform that action at this time.
0 commit comments