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
88ac36db
Commit
88ac36db
authored
Aug 25, 2015
by
Neil Fraser
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #168 from Kaworru/patch-1
Add window scope for getSelection.
parents
218fdc66
d555121a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
core/utils.js
core/utils.js
+2
-2
No files found.
core/utils.js
View file @
88ac36db
...
...
@@ -349,10 +349,10 @@ Blockly.createSvgElement = function(name, attrs, parent, opt_workspace) {
* Deselect this text, so that it doesn't mess up any subsequent drag.
*/
Blockly
.
removeAllRanges
=
function
()
{
if
(
getSelection
()
)
{
if
(
window
.
getSelection
)
{
setTimeout
(
function
()
{
try
{
var
selection
=
getSelection
();
var
selection
=
window
.
getSelection
();
if
(
!
selection
.
isCollapsed
)
{
selection
.
removeAllRanges
();
}
...
...
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