Closed arextar closed 12 years ago
':read-only': function(el) {
var nodeName = el.nodeName;
return (nodeName !== "INPUT" && nodeName !== "TEXTAREA" || el.disabled) && el.getAttribute("contenteditable") === null;
}
A quick test of the function: http://jsfiddle.net/nG6bu/1/embedded/result/
I can open a pull request if you think this is a good idea
Looks good to me.
I think read-only should look at the contenteditable attribute and whether or not the element is an input element. Also: a disabled text input could be considered read-only.