1
votes

I have the following short code to create a div when button is clicked, inside the div is a span tag with contenteditable="false". When span is doubled clicked, it should set and change the contenteditable attribute from false to true, so text can be made editable on dblclick. Check the example at http://jsfiddle.net/dtxhe/

This is working in firefox, chrome and ie8, but not IE7 or quirks mode. Any ideas. How can i fix this.

1
@alex You should try a different event, like single click... I've heard of double click causing problems in IE7. That's just an idea--not sure what else I can say.jlmakes
@alex On jsFiddle, place the JavaScript code inside the JavaScript box. That'll make your demo more readable.Šime Vidas
dblclick works fine in ie. Even if you change it to click, it still doesn't work. I clueless to what could be causing this.Hussein
@alex I cleaned up your demo. jsfiddle.net/dtxhe/3Šime Vidas
Thanks @Sime. It's only few lines of code. I didn't bother with the jsfiddle cleanup.Hussein

1 Answers

2
votes

In case you hadn't already figured this one out the answer I believe is the difference between "contenteditable" and "contentEditable" for the attribute name. IE7 is picky.