File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 44 left : 0 ;
55 width : 100% ;
66 height : 100% ;
7- background : rgba (0 , 0 , 0 , 0.6 );
7+ background : rgba (255 , 255 , 255 , 0.6 );
88 z-index : 1000000 ;
99 display : none;
1010 cursor : crosshair;
2020
2121# __ga_captureBox__ {
2222 position : absolute;
23- border : white 1px dashed;
23+ border : black 1px dashed;
2424 display : none;
2525}
Original file line number Diff line number Diff line change @@ -207,7 +207,8 @@ function pasteCode(code: string) {
207207 }
208208 }
209209
210- const activeInputBox = document . activeElement . tagName === 'INPUT' ?
210+ const activeInputBox =
211+ document . activeElement && document . activeElement . tagName === 'INPUT' ?
211212 document . activeElement :
212213 null ;
213214 if ( activeInputBox ) {
@@ -221,3 +222,18 @@ function pasteCode(code: string) {
221222 firstInputBox . value = code ;
222223 return ;
223224}
225+
226+ window . onkeydown = ( event ) => {
227+ if ( event . keyCode === 27 ) {
228+ event . preventDefault ( ) ;
229+ const grayLayout = document . getElementById ( '__ga_grayLayout__' ) ;
230+ const captureBox = document . getElementById ( '__ga_captureBox__' ) ;
231+
232+ if ( grayLayout ) {
233+ grayLayout . style . display = 'none' ;
234+ }
235+ if ( captureBox ) {
236+ captureBox . style . display = 'none' ;
237+ }
238+ }
239+ } ;
You can’t perform that action at this time.
0 commit comments