Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

contenteditable test gives false negative in Firefox 3.x #570

timdown opened this Issue Apr 30, 2012 · 3 comments


None yet
3 participants

timdown commented Apr 30, 2012

The contenteditable test gives false negatives in some browsers because isContentEditable is not implemented in some browsers that do support contenteditable, such as Firefox 3.x.

Instead of

Modernizr.addTest('contenteditable', 'isContentEditable' in document.documentElement);

... I would suggest:

Modernizr.addTest('contenteditable', 'contentEditable' in document.documentElement);




paulirish commented Apr 30, 2012

That sounds good. Can you doublecheck your version produces correct results in all desktop browsers?

From what i hear, it's unreliable on mobile. See html5test.com's source for details on that one.

timdown commented May 3, 2012

It's fine in desktop browsers I've tried (IE 6+, Firefox 2+, Opera 11, Chrome, Safari 4+) and I'm pretty sure about older Safari and Opera, although I don't have them to hand. Mobile I don't know, I only have iOS 5 devices (fine in those), although I recall that prior to iOS 5, you could set contenteditable on an element and it would claim to be contenteditable without actually allowing editing, as noted in the Undetectables page.

Not sure where to find details in http://html5test.com/ about contenteditable in mobile: I can see that it's testing for contentEditable and isContentEditable but if there's more detail then I missed it.

Re: mobile, Android 2.3 and below don't properly report isContentEditable either: http://alfonsoml.blogspot.com/2010/07/does-android-22-support-contenteditable.html

Currently hitting this issue right now.

@paulirish paulirish closed this in d693c56 May 11, 2012

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment