sproutcore / rich-text-editor

A rich text editor for SproutCore.
Other
6 stars 6 forks source link

In Firefox, don't disable image resizable unless editor is enabled #26

Closed jameschao closed 7 years ago

jameschao commented 9 years ago

This is a pretty obscure but that occurs only in Firefox when the editor view is disabled.

Specifically, this code causes an NS_ERROR_FAILURE to be thrown:

            document.execCommand("enableObjectResizing", false, false);

I think this happens because the browser finds no element that is contentEditable and so it freaks out. An alternative solution is to enable document.designMode in Firefox, but there might have other unintended consequences so I decided not to go down that route.

mauritslamers commented 7 years ago

Thanks for bringing it to my attention!