Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
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
appinventor-sources
Commits
4b7763dc
Commit
4b7763dc
authored
Jun 27, 2018
by
Evan W. Patton
Committed by
Jeffrey Schiller
Jun 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unbind all handlers in typeblock before binding new handler
Change-Id: I1cc72fa09f8e5b51c22b78e774a6c5b5d119f9f7
parent
ca80ab80
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
appinventor/blocklyeditor/src/typeblock.js
appinventor/blocklyeditor/src/typeblock.js
+2
-0
No files found.
appinventor/blocklyeditor/src/typeblock.js
View file @
4b7763dc
...
@@ -210,6 +210,7 @@ Blockly.TypeBlock.prototype.hide = function(){
...
@@ -210,6 +210,7 @@ Blockly.TypeBlock.prototype.hide = function(){
// if (this.typeBlockDiv_ == null)
// if (this.typeBlockDiv_ == null)
// return;
// return;
goog
.
style
.
showElement
(
goog
.
dom
.
getElement
(
this
.
typeBlockDiv_
),
false
);
goog
.
style
.
showElement
(
goog
.
dom
.
getElement
(
this
.
typeBlockDiv_
),
false
);
goog
.
events
.
unlisten
(
this
.
docKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
goog
.
events
.
unlisten
(
this
.
inputKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
goog
.
events
.
unlisten
(
this
.
inputKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
this
.
handleKeyWrapper_
=
this
.
handleKey
.
bind
(
this
);
this
.
handleKeyWrapper_
=
this
.
handleKey
.
bind
(
this
);
goog
.
events
.
listen
(
this
.
docKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
goog
.
events
.
listen
(
this
.
docKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
...
@@ -230,6 +231,7 @@ Blockly.TypeBlock.prototype.show = function(){
...
@@ -230,6 +231,7 @@ Blockly.TypeBlock.prototype.show = function(){
// correctly (at times it was missing the first char)
// correctly (at times it was missing the first char)
goog
.
dom
.
getElement
(
this
.
inputText_
).
value
=
''
;
goog
.
dom
.
getElement
(
this
.
inputText_
).
value
=
''
;
goog
.
events
.
unlisten
(
this
.
docKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
goog
.
events
.
unlisten
(
this
.
docKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
goog
.
events
.
unlisten
(
this
.
inputKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
this
.
handleKeyWrapper_
=
this
.
handleKey
.
bind
(
this
);
this
.
handleKeyWrapper_
=
this
.
handleKey
.
bind
(
this
);
goog
.
events
.
listen
(
this
.
inputKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
goog
.
events
.
listen
(
this
.
inputKh_
,
'
key
'
,
this
.
handleKeyWrapper_
);
this
.
visible
=
true
;
this
.
visible
=
true
;
...
...
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