3 ms·
Heh, I remember a fun bug(?) I had found in IE while using contenteditable on my previous job. I had been assigned to implement a rich text editor which was pr
by as1mov 8y ago
Heh, I remember a fun bug(?) I had found in IE while using contenteditable on my previous job.
I had been assigned to implement a rich text editor which was pretty close to what OP has posted, except that it a feature where the editable text had 'islands' of uneditable text sprinkled in-between. Sounds simple enough? Just add a nested element with contenteditable set to `false`. This worked well enough in Firefox and Chrome, but for some reason it wouldn't work in IE (surprise!).
After hours of scouring the internet, I found the solution[1], which was setting contenteditable to `true` for disabling the edit in the case of IE. The reason for this behavior? Nobody knows.
I still feel pangs of guilt for the poor sod who has to maintain that dumpster fire that I wrote as a fresh faced grad.
[1] https://stackoverflow.com/questions/7522848/contenteditable-false-inside-contenteditable-true-block-is-still-editable-in-ie8 https://stackoverflow.com/questions/7522848/contenteditable-...