Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix to bad option rendering in IE8 and below.

  • Loading branch information...
commit 6b3c8131f64291ffa9db76ff0df50fe1604c69a3 1 parent 145fc24
@imjoshdean imjoshdean authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 view/render.js
View
5 view/render.js
@@ -12,6 +12,7 @@ try {
var attrMap = {
"class" : "className",
"value": "value",
+ "innerText" : "innerText",
"textContent" : "textContent"
},
tagMap = {
@@ -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){
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.