Merge pull request #1780 from ethereum/slrm

check for current for ctrl + s
pull/1864/head
Liana Husikyan 3 years ago committed by GitHub
commit 8cf924de2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/solidity-compiler/src/app/compiler-api.ts

@ -293,7 +293,7 @@ export const CompilerApiMixin = (Base) => class extends Base {
// Run the compiler instead of trying to save the website
this.data.eventHandlers.onKeyDown = (e) => {
// ctrl+s or command+s
if ((e.metaKey || e.ctrlKey) && e.keyCode === 83) {
if ((e.metaKey || e.ctrlKey) && e.keyCode === 83 && this.currentFile !== '') {
e.preventDefault()
this.compileTabLogic.runCompiler(this.getAppParameter('hardhat-compilation'))
}

Loading…
Cancel
Save