@khanacademy/math-input 23.0.0 → 23.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 CHANGED
@@ -60,7 +60,7 @@ const addLibraryVersionToPerseusDebug = (libraryName, libraryVersion) => {
60
60
 
61
61
  // This file is processed by a Rollup plugin (replace) to inject the production
62
62
  const libName = "@khanacademy/math-input";
63
- const libVersion = "23.0.0";
63
+ const libVersion = "23.0.1";
64
64
  addLibraryVersionToPerseusDebug(libName, libVersion);
65
65
 
66
66
  class View extends React.Component {
@@ -822,37 +822,6 @@ function handleBackspaceInLogIndex(mathField, cursor) {
822
822
  mathField.keystroke("Backspace");
823
823
  }
824
824
  }
825
- function handleBackspaceOutsideParens(cursor) {
826
- // In this case the node with '\\left(' for its ctrlSeq
827
- // is the parent of the expression contained within the
828
- // parentheses.
829
- //
830
- // Handle selecting an expression before deleting:
831
- // (x+1)| => |(x+1)|
832
- // \log(x+1)| => |\log(x+1)|
833
-
834
- const leftNode = cursor[mathQuillInstance.L];
835
- const rightNode = cursor[mathQuillInstance.R];
836
- const command = maybeFindCommandBeforeParens(leftNode);
837
- if (command && command.startNode) {
838
- // There's a command before the parens so we select it as well as
839
- // the parens.
840
- cursor.insLeftOf(command.startNode);
841
- cursor.startSelection();
842
- if (rightNode === MathFieldActionType.MQ_END) {
843
- cursor.insAtRightEnd(cursor.parent);
844
- } else {
845
- cursor.insLeftOf(rightNode);
846
- }
847
- cursor.select();
848
- cursor.endSelection();
849
- } else {
850
- cursor.startSelection();
851
- cursor.insLeftOf(leftNode); // left of \\left(
852
- cursor.select();
853
- cursor.endSelection();
854
- }
855
- }
856
825
  function handleBackspaceInsideParens(mathField, cursor) {
857
826
  // Handle situations when the cursor is inside parens or a
858
827
  // command that uses parens, e.g. \log() or \tan()
@@ -943,8 +912,6 @@ function handleBackspace(mathField) {
943
912
  selectNode(leftNode, cursor);
944
913
  } else if (isNthRootIndex(parent)) {
945
914
  handleBackspaceInRootIndex(mathField, cursor);
946
- } else if (leftNode.ctrlSeq === "\\left(") {
947
- handleBackspaceOutsideParens(cursor);
948
915
  } else if (grandparent.ctrlSeq === "\\left(") {
949
916
  handleBackspaceInsideParens(mathField, cursor);
950
917
  } else if (isInsideLogIndex(cursor)) {