@bbn/bbn 2.0.201 → 2.0.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/fn/init.js +6 -3
- package/package.json +1 -1
package/dist/fn/init.js
CHANGED
|
@@ -10,8 +10,11 @@ import isFunction from './type/isFunction.js';
|
|
|
10
10
|
import log from './browser/log.js';
|
|
11
11
|
import timestamp from './datetime/timestamp.js';
|
|
12
12
|
import setupIntl from '../dt/functions/setupIntl.js';
|
|
13
|
-
const
|
|
13
|
+
const onFocus = () => {
|
|
14
14
|
bbn.env.last_focus = bbn.dt().unix();
|
|
15
|
+
};
|
|
16
|
+
const onActivity = (e) => {
|
|
17
|
+
onFocus();
|
|
15
18
|
if (bbn.env.nav !== "ajax") {
|
|
16
19
|
return;
|
|
17
20
|
}
|
|
@@ -102,8 +105,8 @@ export default function init(cfg, force) {
|
|
|
102
105
|
});
|
|
103
106
|
document.addEventListener("click", onActivity);
|
|
104
107
|
document.addEventListener("keydown", onActivity);
|
|
105
|
-
document.addEventListener("focusin",
|
|
106
|
-
document.addEventListener("focusout",
|
|
108
|
+
document.addEventListener("focusin", onFocus);
|
|
109
|
+
document.addEventListener("focusout", onFocus);
|
|
107
110
|
window.addEventListener("hashchange", () => {
|
|
108
111
|
debugger;
|
|
109
112
|
bbn.env.hashChanged = new Date().getTime();
|