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:
Katelyn Mann
2016-03-23 14:39:02 -07:00
parent 39fbd24659
commit b11bd4fb71
9 changed files with 22 additions and 26 deletions

View File

@@ -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;',