Skip to content

Commit

Permalink
move "select" method to base
Browse files Browse the repository at this point in the history
so that we can use it in StaticMath as well
  • Loading branch information
eluberoff committed Dec 7, 2024
1 parent 487e225 commit 4979d5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mathquill.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ declare namespace MathQuill {
setAriaLabel(str: string): this;
blur(): this;
focus(): this;
select(): this;
}

interface EditableMathQuill extends BaseMathQuill {
select: () => EditableMathQuill;
moveToRightEnd: () => EditableMathQuill;
moveToLeftEnd: () => EditableMathQuill;
cmd: (latex: string) => EditableMathQuill;
Expand Down
8 changes: 4 additions & 4 deletions src/publicapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ function getInterface(v: number): MathQuill.v3.API | MathQuill.v1.API {
if (this.__controller.editable) this.__controller.scrollHoriz();
return this;
}
select() {
this.__controller.selectAll();
return this;
}
blur() {
this.__controller.getTextarea().blur();
return this;
Expand All @@ -376,10 +380,6 @@ function getInterface(v: number): MathQuill.v3.API | MathQuill.v1.API {
this.__controller.editablesTextareaEvents();
return this;
}
select() {
this.__controller.selectAll();
return this;
}
clearSelection() {
this.__controller.cursor.clearSelection();
return this;
Expand Down

0 comments on commit 4979d5a

Please sign in to comment.