Skip to content

Commit

Permalink
fix: Fix bug that caused text to be selected when long-pressing in th…
Browse files Browse the repository at this point in the history
…e workspace on a touch device.
  • Loading branch information
gonfunko committed Nov 22, 2024
1 parent f1cbaab commit fa400b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
13 changes: 2 additions & 11 deletions core/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ let content = `
position: relative;
overflow: hidden; /* So blocks in drag surface disappear at edges */
touch-action: none;
user-select: none;
-webkit-user-select: none;
}
.blocklyNonSelectable {
Expand Down Expand Up @@ -266,17 +268,6 @@ let content = `
cursor: default;
}
/*
Don't allow users to select text. It gets annoying when trying to
drag a block and selected text moves instead.
*/
.blocklySvg text {
user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
cursor: inherit;
}
.blocklyHidden {
display: none;
}
Expand Down
1 change: 0 additions & 1 deletion core/toolbox/toolbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ export class Toolbox
const toolboxContainer = document.createElement('div');
toolboxContainer.setAttribute('layout', this.isHorizontal() ? 'h' : 'v');
dom.addClass(toolboxContainer, 'blocklyToolboxDiv');
dom.addClass(toolboxContainer, 'blocklyNonSelectable');
toolboxContainer.setAttribute('dir', this.RTL ? 'RTL' : 'LTR');
return toolboxContainer;
}
Expand Down

0 comments on commit fa400b6

Please sign in to comment.