Skip to content

Commit

Permalink
Ensure new style output tags don't break old style ones.
Browse files Browse the repository at this point in the history
Change-Id: Iccf2355081bc10efbfaad38b5589a0d852373f16
  • Loading branch information
zoltan-dulac committed May 9, 2011
1 parent 5d95a9f commit f80e6eb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions shared/js/html5Widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,16 +590,23 @@ var html5Widgets = new function(){

function getValueFormula () {
var formula = DOMHelpers.getAttributeValue(me.node, 'onforminput');
if (formula == null) {
return null;
}
formula = formula
.replace(valueRe, 'value')
.replace(varRe, 'document.forms["' + parentForm.id + '"].$1');
return formula;
}

me.resolve = function () {
eval(valueFormula);
me.node.innerHTML = value;
me.node.value = value;
if (valueFormula == null) {
return;
} else {
eval(valueFormula);
me.node.innerHTML = value;
me.node.value = value;
}

}

Expand Down

0 comments on commit f80e6eb

Please sign in to comment.