File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/vs/workbench/contrib/webview/browser/pre Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 5
5
< meta charset ="UTF-8 ">
6
6
7
7
< meta http-equiv ="Content-Security-Policy "
8
- content ="default-src 'none'; script-src 'sha256-EDTzzejMryXNJsvXPm3ha4m5Mi6h2Y//JRojh+K0+bY =' 'self'; frame-src 'self'; style-src 'unsafe-inline'; ">
8
+ content ="default-src 'none'; script-src 'sha256-j+I5FRqQBE2aQY6H/U/pjZI3buJy36yZ/upZTKZov3c =' 'self'; frame-src 'self'; style-src 'unsafe-inline'; ">
9
9
10
10
<!-- Disable pinch zooming -->
11
11
< meta name ="viewport "
572
572
// make sure we block the browser from dispatching it. Instead VS Code
573
573
// handles these events and will dispatch a copy/paste back to the webview
574
574
// if needed
575
- if ( isUndoRedo ( e ) || isPrint ( e ) || isFindEvent ( e ) ) {
575
+ if ( isUndoRedo ( e ) || isPrint ( e ) || isFindEvent ( e ) || isSaveEvent ( e ) ) {
576
576
e . preventDefault ( ) ;
577
577
} else if ( isCopyPasteOrCut ( e ) ) {
578
578
if ( onElectron ) {
646
646
return hasMeta && e . key . toLowerCase ( ) === 'f' ;
647
647
}
648
648
649
+ /**
650
+ * @param {KeyboardEvent } e
651
+ * @return {boolean }
652
+ */
653
+ function isSaveEvent ( e ) {
654
+ const hasMeta = e . ctrlKey || e . metaKey ;
655
+ return hasMeta && e . key . toLowerCase ( ) === 's' ;
656
+ }
657
+
649
658
let isHandlingScroll = false ;
650
659
651
660
/**
You can’t perform that action at this time.
0 commit comments