From b6a01bd27dbcd2f9c9df917ecc96b8a2bd88413d Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 3 Feb 2011 12:25:51 -0800 Subject: fixed population of value attribute on option The value attribute must be populated manually, since different browsers default to different value of option when not explicitly defined. --- src/markups.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/markups.js') diff --git a/src/markups.js b/src/markups.js index 21dab128..0aa7170e 100644 --- a/src/markups.js +++ b/src/markups.js @@ -60,11 +60,18 @@ angularTextMarkup('{{}}', function(text, textNode, parentElement) { // TODO: this should be widget not a markup angularTextMarkup('OPTION', function(text, textNode, parentElement){ if (nodeName_(parentElement) == "OPTION") { - var select = document.createElement('select'); - select.insertBefore(parentElement[0].cloneNode(true), _null); - if (!select.innerHTML.match(/.*<\/\s*option\s*>/gi)) { - parentElement.attr('value', text); - } + var select = jqLite('