mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Also reset cursor on text selection
This commit is contained in:
parent
f875abe6b0
commit
656cdd1686
1 changed files with 6 additions and 1 deletions
|
@ -692,6 +692,10 @@ function clearSelection() {
|
|||
});
|
||||
}
|
||||
|
||||
function resetCursor() {
|
||||
document.documentElement.style.cursor = "";
|
||||
}
|
||||
|
||||
function deleteSelectedElements() {
|
||||
for (let i = elements.length - 1; i >= 0; --i) {
|
||||
if (elements[i].isSelected) {
|
||||
|
@ -1240,6 +1244,7 @@ class App extends React.Component<{}, AppState> {
|
|||
}
|
||||
|
||||
if (isTextElement(element)) {
|
||||
resetCursor();
|
||||
const text = prompt("What text do you want?");
|
||||
if (text === null) {
|
||||
return;
|
||||
|
@ -1401,7 +1406,7 @@ class App extends React.Component<{}, AppState> {
|
|||
window.removeEventListener("mousemove", onMouseMove);
|
||||
window.removeEventListener("mouseup", onMouseUp);
|
||||
|
||||
document.documentElement.style.cursor = "";
|
||||
resetCursor();
|
||||
|
||||
// if no element is clicked, clear the selection and redraw
|
||||
if (draggingElement === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue