use boolean instead of propertyChangeCounter
This commit is contained in:
parent
125629ce17
commit
c8be2ef60d
1 changed files with 5 additions and 4 deletions
|
|
@ -143,8 +143,9 @@ var TextInput = function(parentNode, host) {
|
|||
}
|
||||
}
|
||||
if (useragent.isOldIE) {
|
||||
var inPropertyChange = false;
|
||||
var onPropertyChange = function(e){
|
||||
if (propertyChangeCounter)
|
||||
if (inPropertyChange)
|
||||
return;
|
||||
var data = text.value;
|
||||
if (inCompostion || !data || data == PLACEHOLDER)
|
||||
|
|
@ -154,12 +155,12 @@ var TextInput = function(parentNode, host) {
|
|||
return syncProperty.schedule();
|
||||
|
||||
sendText(data);
|
||||
propertyChangeCounter++;
|
||||
// ie8 calls propertychange handlers synchronously!
|
||||
inPropertyChange = true;
|
||||
resetValue();
|
||||
propertyChangeCounter--;
|
||||
inPropertyChange = false;
|
||||
};
|
||||
var syncProperty = lang.delayedCall(onPropertyChange);
|
||||
var propertyChangeCounter = 0;
|
||||
event.addListener(text, "propertychange", onPropertyChange);
|
||||
|
||||
var keytable = { 13:1, 27:1 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue