← All notes

A stupid error that Copilot caught...

An annoying issue came up after adding the Markdown editor used behind the scenes (md-editor-v3): focusing inside the editor automatically triggered the first toolbar button, making it difficult to start typing.

The resolution was embarrasingly simple, but it took Copilot diagnosing the problem before it became obvious.

The editor had been placed inside a label tag: the result of lazily replacing the textarea field that used to be there.
Whether it was because of broken HTML or not, the focus was being redirected to the first available button as a result.

Share this post