this.currentPage = -1;
this.currentNumericPage = 1;
this.maskHashEvent = false;
+ this.windowHasFocus = true;
this.rightClick = false;
$this.changePage();
});
+ $(window).on('blur', function () {
+ $this.windowHasFocus = false;
+ });
+
+ $(window).on('focus', function () {
+ if (!$this.windowHasFocus) {
+ $this.windowHasFocus = true;
+ $this.resetKeyModifiers();
+ }
+ });
+
key('esc', function () {
+ $this.resetKeyModifiers();
if ($this.popup.hasOpenPopup()) {
$this.popup.close();
return false;
this.changePage();
},
+ resetKeyModifiers: function () {
+ $("#linkeditor-main").removeClass('selection').removeClass('grab').removeClass('duplicate');
+ },
+
runAction: function (act, args) {
if (args === undefined) {
args = [];