changeset 2915:03a66e54cdff

Fix for #161 with popup focus.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Tue, 01 Aug 2017 14:19:45 +0100
parents fc41c3d909b7
children 300bb2bbba4a 60e5116da71a db6c52995118
files js/core.js
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/js/core.js	Tue Aug 01 14:17:02 2017 +0100
+++ b/js/core.js	Tue Aug 01 14:19:45 2017 +0100
@@ -555,7 +555,7 @@
     this.store = null;
     var lastNodeStart;
     $(window).keypress(function (e) {
-        if (e.keyCode == 13 && popup.popup.style.visibility == 'visible') {
+        if (e.keyCode == 13 && popup.popup.style.visibility == 'visible' && interfaceContext.lightbox.isVisible() === false) {
             console.log(e);
             popup.buttonProceed.onclick();
             e.preventDefault();
@@ -2421,6 +2421,9 @@
         },
         resize: function (event) {
             this.root.style.left = (window.innerWidth / 2) - 250 + 'px';
+        },
+        isVisible: function () {
+            return this.root.style.visibility == "visible";
         }
     };