← Back to context

Comment by a_e_k

1 day ago

This is explicitly called out in the canvas spec's best practices section with a laundry list of things you'd have to re-implement [1].

> Authors should avoid implementing text editing controls using the canvas element. Doing so has a large number of disadvantages:

> [...]

> This is a huge amount of work, and authors are most strongly encouraged to avoid doing any of it by instead using the input element, the textarea element, or the contenteditable attribute.

[1] https://html.spec.whatwg.org/multipage/canvas.html#best-prac...