mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
Remove Blockly.removeAllRanges and replace it with calls to add/remove
css to mark text as unselectable instead. I can't prove this is significantly faster with numbers since the call to setup the time out costs ~.1ms and the call when the timer fires is ~.05. This happens on almost every mouse event though. Plus, it seems to remove a flicker of highlighting when frames are skipped and keeps scrolling via the scrollbar from highlighting.
This commit is contained in:
@@ -143,6 +143,13 @@ Blockly.Css.CONTENT = [
|
||||
'z-index: 999;',
|
||||
'}',
|
||||
|
||||
'.blocklyNonSelectable {',
|
||||
'user-select: none;',
|
||||
'-moz-user-select: none;',
|
||||
'-webkit-user-select: none;',
|
||||
'-ms-user-select: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyTooltipDiv {',
|
||||
'background-color: #ffffc7;',
|
||||
'border: 1px solid #ddc;',
|
||||
|
||||
Reference in New Issue
Block a user