Commit afd5a3cf authored by Sven Franck's avatar Sven Franck

remove focus (of inputs) when switching tabs (window.onblur)

parent 81ef4b34
...@@ -4995,8 +4995,7 @@ ...@@ -4995,8 +4995,7 @@
if (type === "click" && e.target.getAttribute("data-rel") === null) { if (type === "click" && e.target.getAttribute("data-rel") === null) {
e.preventDefault(); e.preventDefault();
if (type === "click" && (tag === "SELECT" || if (type === "click" && (tag === "SELECT" ||
(tag === "INPUT" && e.target.type !== "submit")) || (tag === "INPUT" && e.target.type !== "submit"))) {
(type === "keyup" && e.target.type === "submit")) {
return; return;
} }
} }
...@@ -6213,6 +6212,7 @@ ...@@ -6213,6 +6212,7 @@
*/ */
//TODO: merge with pagebindings, so all jQuery is at one place! //TODO: merge with pagebindings, so all jQuery is at one place!
app.setGlobalBindings = function () { app.setGlobalBindings = function () {
$(document) $(document)
.enhanceWithin() .enhanceWithin()
...@@ -6276,6 +6276,12 @@ ...@@ -6276,6 +6276,12 @@
.on("popupbeforeposition", function (e) { .on("popupbeforeposition", function (e) {
factory.util.generatePopupContents(app.generateActionObject(e)); factory.util.generatePopupContents(app.generateActionObject(e));
}); });
// remove focus from active elements on key-tab switches
window.onblur = function () {
document.activeElement.blur();
};
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment