Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Improved drawing speed on desktop Safari

Compare
Choose a tag to compare
@jeffpar jeffpar released this 06 Dec 01:46
· 4265 commits to master since this release

As described in this PCjs blog post, Canvas drawing performance in desktop Safari v8.0 suffers significantly if the Canvas is marked "contenteditable" and has focus. Safari is probably doing something silly, like trying to mask an (invisible) cursor that a normal "contenteditable" control might have but which Canvas objects should not have.

Whatever the reason, placing a transparent <textarea> on top of the Canvas for all input operations and removing the "contenteditable" attribute from the Canvas seems to solve the problem. Performance in other browsers (eg, Chrome) seems unaffected.