File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ export default {
9393 methods: {
9494 toggleEventListener () {
9595 const listener = this .enabled ? document .body .addEventListener : document .body .removeEventListener
96+
9697 listener? .call (document .body , ' mousemove' , this .updateLinkParams )
98+ listener? .call (document .body , ' resize' , this .closeOverlay , true )
9799 listener? .call (document .body , ' click' , this .handleClick , true )
98100 },
99101 toggleEnabled () {
@@ -179,15 +181,18 @@ export default {
179181 this .linkParams = params
180182 }
181183 else {
182- this .overlayVisible = false
183- this .linkParams = {
184- file: ' ' ,
185- line: 0 ,
186- column: 0 ,
187- }
184+ this .closeOverlay ()
188185 }
189186 this .onUpdated ()
190187 },
188+ closeOverlay () {
189+ this .overlayVisible = false
190+ this .linkParams = {
191+ file: ' ' ,
192+ line: 0 ,
193+ column: 0 ,
194+ }
195+ },
191196
192197 // Public methods
193198 enable () {
You can’t perform that action at this time.
0 commit comments