Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
764452eb
Commit
764452eb
authored
Mar 17, 2015
by
Neil Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Squeltch double-click highlighting on workspace and toolbox.
parent
329fd375
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
core/blockly.js
core/blockly.js
+9
-11
core/toolbox.js
core/toolbox.js
+1
-0
No files found.
core/blockly.js
View file @
764452eb
...
@@ -291,6 +291,7 @@ Blockly.onMouseDown_ = function(e) {
...
@@ -291,6 +291,7 @@ Blockly.onMouseDown_ = function(e) {
Blockly
.
showContextMenu_
(
e
);
Blockly
.
showContextMenu_
(
e
);
}
else
if
((
Blockly
.
readOnly
||
isTargetSvg
)
&&
}
else
if
((
Blockly
.
readOnly
||
isTargetSvg
)
&&
Blockly
.
mainWorkspace
.
scrollbar
)
{
Blockly
.
mainWorkspace
.
scrollbar
)
{
Blockly
.
removeAllRanges
();
// If the workspace is editable, only allow dragging when gripping empty
// If the workspace is editable, only allow dragging when gripping empty
// space. Otherwise, allow dragging when gripping anywhere.
// space. Otherwise, allow dragging when gripping anywhere.
Blockly
.
mainWorkspace
.
dragMode
=
true
;
Blockly
.
mainWorkspace
.
dragMode
=
true
;
...
@@ -534,17 +535,14 @@ Blockly.hideChaff = function(opt_allowToolbox) {
...
@@ -534,17 +535,14 @@ Blockly.hideChaff = function(opt_allowToolbox) {
* Deselect this text, so that it doesn't mess up any subsequent drag.
* Deselect this text, so that it doesn't mess up any subsequent drag.
*/
*/
Blockly
.
removeAllRanges
=
function
()
{
Blockly
.
removeAllRanges
=
function
()
{
if
(
window
.
getSelection
)
{
// W3
if
(
getSelection
())
{
var
sel
=
window
.
getSelection
();
setTimeout
(
function
()
{
if
(
sel
&&
sel
.
removeAllRanges
)
{
try
{
setTimeout
(
function
()
{
getSelection
().
removeAllRanges
();
try
{
}
catch
(
e
)
{
window
.
getSelection
().
removeAllRanges
();
// MSIE throws 'error 800a025e' here.
}
catch
(
e
)
{
}
// MSIE throws 'error 800a025e' here.
},
0
);
}
},
0
);
}
}
}
};
};
...
...
core/toolbox.js
View file @
764452eb
...
@@ -299,6 +299,7 @@ Blockly.Toolbox.TreeControl.prototype.createNode = function(opt_html) {
...
@@ -299,6 +299,7 @@ Blockly.Toolbox.TreeControl.prototype.createNode = function(opt_html) {
* @override
* @override
*/
*/
Blockly
.
Toolbox
.
TreeControl
.
prototype
.
setSelectedItem
=
function
(
node
)
{
Blockly
.
Toolbox
.
TreeControl
.
prototype
.
setSelectedItem
=
function
(
node
)
{
Blockly
.
removeAllRanges
();
if
(
this
.
selectedItem_
==
node
)
{
if
(
this
.
selectedItem_
==
node
)
{
return
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment