kopia lustrzana https://github.com/c9/core
Merge pull request +15156 from c9/ide-restore
disable ide shortcuts when restore screen is openpull/389/head
commit
bc900b2c2f
|
@ -241,6 +241,11 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
// Show Restore Screen
|
// Show Restore Screen
|
||||||
el.style.display = "block";
|
el.style.display = "block";
|
||||||
|
// disable ide shortcuts
|
||||||
|
window.addEventListener("keypress", stopEvent, true);
|
||||||
|
window.addEventListener("keydown", stopEvent, true);
|
||||||
|
window.addEventListener("keyup", stopEvent, true);
|
||||||
|
|
||||||
|
|
||||||
clearTimeout(timeoutTimer);
|
clearTimeout(timeoutTimer);
|
||||||
timeoutTimer = setTimeout(function(){
|
timeoutTimer = setTimeout(function(){
|
||||||
|
@ -257,6 +262,10 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideRestore() {
|
function hideRestore() {
|
||||||
|
window.removeEventListener("keypress", stopEvent, true);
|
||||||
|
window.removeEventListener("keydown", stopEvent, true);
|
||||||
|
window.removeEventListener("keyup", stopEvent, true);
|
||||||
|
|
||||||
if (!el) return;
|
if (!el) return;
|
||||||
|
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
@ -277,6 +286,10 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function stopEvent(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
|
||||||
/***** Lifecycle *****/
|
/***** Lifecycle *****/
|
||||||
|
|
||||||
plugin.on("load", function(){
|
plugin.on("load", function(){
|
||||||
|
|
Ładowanie…
Reference in New Issue