mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +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:
@@ -390,7 +390,6 @@ Blockly.Toolbox.TreeControl.prototype.createNode = function(opt_html) {
|
||||
* @override
|
||||
*/
|
||||
Blockly.Toolbox.TreeControl.prototype.setSelectedItem = function(node) {
|
||||
Blockly.removeAllRanges();
|
||||
var toolbox = this.toolbox_;
|
||||
if (node == this.selectedItem_ || node == toolbox.tree_) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user