@enact/spotlight 4.0.5 → 4.1.0
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
The following is a curated list of changes in the Enact spotlight module, newest changes on the top.
|
|
4
4
|
|
|
5
|
+
## [4.1.0] - 2021-11-04
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `spotlight/SpotlightRootDecorator` to show focus effect after initial loading
|
|
10
|
+
|
|
11
|
+
## [4.0.8] - 2021-10-21
|
|
12
|
+
|
|
13
|
+
No significant changes.
|
|
14
|
+
|
|
15
|
+
## [4.0.7] - 2021-09-28
|
|
16
|
+
|
|
17
|
+
No significant changes.
|
|
18
|
+
|
|
19
|
+
## [4.0.6] - 2021-09-28
|
|
20
|
+
|
|
21
|
+
No significant changes.
|
|
22
|
+
|
|
5
23
|
## [4.0.5] - 2021-08-02
|
|
6
24
|
|
|
7
25
|
### Fixed
|
|
@@ -146,6 +146,10 @@ var SpotlightRootDecorator = (0, _hoc["default"])(defaultConfig, function (confi
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
+
_this.handleFocusInBeforeMount = function () {
|
|
150
|
+
_this.hasFocusedIn = true;
|
|
151
|
+
};
|
|
152
|
+
|
|
149
153
|
_this.handleFocusIn = function () {
|
|
150
154
|
if (!input.applied) {
|
|
151
155
|
_this.applyInputType();
|
|
@@ -203,8 +207,12 @@ var SpotlightRootDecorator = (0, _hoc["default"])(defaultConfig, function (confi
|
|
|
203
207
|
_spotlight["default"].set(_container.rootContainerId, {
|
|
204
208
|
overflow: true
|
|
205
209
|
});
|
|
206
|
-
}
|
|
210
|
+
} // Sometimes the focusin event is fired before componentDidMount.
|
|
211
|
+
|
|
207
212
|
|
|
213
|
+
document.addEventListener('focusin', _this.handleFocusInBeforeMount, {
|
|
214
|
+
capture: true
|
|
215
|
+
});
|
|
208
216
|
return _this;
|
|
209
217
|
}
|
|
210
218
|
|
|
@@ -230,6 +238,15 @@ var SpotlightRootDecorator = (0, _hoc["default"])(defaultConfig, function (confi
|
|
|
230
238
|
capture: true
|
|
231
239
|
});
|
|
232
240
|
}
|
|
241
|
+
|
|
242
|
+
document.removeEventListener('focusin', this.handleFocusInBeforeMount, {
|
|
243
|
+
capture: true
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
if (this.hasFocusedIn) {
|
|
247
|
+
this.hasFocusedIn = false;
|
|
248
|
+
this.handleFocusIn();
|
|
249
|
+
}
|
|
233
250
|
}
|
|
234
251
|
}, {
|
|
235
252
|
key: "componentWillUnmount",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/spotlight",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "A focus management library",
|
|
5
5
|
"main": "src/spotlight.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@enact/core": "^4.0
|
|
21
|
+
"@enact/core": "^4.1.0",
|
|
22
22
|
"classnames": "^2.2.6",
|
|
23
23
|
"prop-types": "^15.7.2",
|
|
24
24
|
"ramda": "^0.24.1",
|