@khanacademy/math-input 17.2.2 → 17.3.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/dist/index.js CHANGED
@@ -47,7 +47,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
47
47
 
48
48
  // This file is processed by a Rollup plugin (replace) to inject the production
49
49
  const libName = "@khanacademy/math-input";
50
- const libVersion = "17.2.2";
50
+ const libVersion = "17.3.0";
51
51
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
52
52
 
53
53
  function _extends() {
@@ -4787,6 +4787,13 @@ const KeypadButton = _ref => {
4787
4787
  testId: keyConfig.id
4788
4788
  }, /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
4789
4789
  onClick: e => onClickKey(keyConfig.id, e),
4790
+ onMouseDown: e =>
4791
+ // Prevent the default behavior of forcing the focus to the
4792
+ // button when it is clicked. This way, the focus can
4793
+ // remain on the input field-- for mouse only. The focus
4794
+ // should still shift for keyboard nav.
4795
+ // (The focus shift happens on mouse down, not on click.)
4796
+ e.preventDefault(),
4790
4797
  style: styles$4.clickable,
4791
4798
  "aria-label": keyConfig.ariaLabel
4792
4799
  }, _ref2 => {