@khanacademy/math-input 20.0.0 → 20.0.1
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/es/index.js +4 -18
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +3 -18
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/es/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import PropTypes from 'prop-types';
|
|
|
15
15
|
|
|
16
16
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
17
17
|
const libName = "@khanacademy/math-input";
|
|
18
|
-
const libVersion = "20.0.
|
|
18
|
+
const libVersion = "20.0.1";
|
|
19
19
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
20
20
|
|
|
21
21
|
function _extends() {
|
|
@@ -2609,25 +2609,11 @@ function TabbarItem(props) {
|
|
|
2609
2609
|
} = props;
|
|
2610
2610
|
const tabRef = useRef(null);
|
|
2611
2611
|
useEffect(() => {
|
|
2612
|
-
let timeout;
|
|
2613
2612
|
if (role === "tab" && focus) {
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
* focus to snap to the bottom of the page on first focus.
|
|
2618
|
-
*
|
|
2619
|
-
* This timeout moves around that by delaying the focus enough
|
|
2620
|
-
* to wait for the WonderBlock Popover to move to the correct
|
|
2621
|
-
* location and scroll the user to the correct location.
|
|
2622
|
-
* */
|
|
2623
|
-
timeout = setTimeout(() => {
|
|
2624
|
-
if (tabRef != null && tabRef.current) {
|
|
2625
|
-
// Move element into view when it is focused
|
|
2626
|
-
tabRef == null || tabRef.current.focus();
|
|
2627
|
-
}
|
|
2628
|
-
}, 0);
|
|
2613
|
+
var _tabRef$current;
|
|
2614
|
+
// Move element into view when it is focused
|
|
2615
|
+
tabRef == null || (_tabRef$current = tabRef.current) == null || _tabRef$current.focus();
|
|
2629
2616
|
}
|
|
2630
|
-
return () => clearTimeout(timeout);
|
|
2631
2617
|
}, [role, focus, tabRef]);
|
|
2632
2618
|
return /*#__PURE__*/React.createElement(Clickable, {
|
|
2633
2619
|
onClick: onClick,
|