Skip to content

Commit

Permalink
Fix to bad option rendering in IE8 and below.
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoshdean committed Jan 7, 2013
1 parent 145fc24 commit 6b3c813
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions view/render.js
Expand Up @@ -12,6 +12,7 @@ try {
var attrMap = {
"class" : "className",
"value": "value",
"innerText" : "innerText",
"textContent" : "textContent"
},
tagMap = {
Expand All @@ -29,7 +30,7 @@ var attrMap = {
attributePlaceholder = '__!!__',
attributeReplace = /__!!__/g,
tagToContentPropMap = {
option: "textContent",
option: "textContent" in document.createElement("option") ? "textContent" : "innerText",
textarea: "value"
},
bool = can.each(["checked","disabled","readonly","required"], function(n){
Expand Down Expand Up @@ -262,7 +263,7 @@ can.extend(can.view, {
// example options should use textContent
contentProp = tagToContentPropMap[tagName];


// The magic tag is outside or between tags.
if ( status === 0 && !contentProp ) {
// Return an element tag with a hookup in place of the content
Expand Down

0 comments on commit 6b3c813

Please sign in to comment.