trix icon indicating copy to clipboard operation
trix copied to clipboard

trix-toolbar can't put after trix-editor

Open hoppergee opened this issue 3 years ago • 2 comments

trix form can only works when trix-toolbar put before trix-editor

Steps to Reproduce
<trix-editor></trix-editor>
<trix-toolbar></trix-toolbar>

When trix-toolbar put after trix-editor, I will get an error when submit the form.

An invalid form control with name='href' is not focusable.

I have to fix it by put the trix-toolbar before trix-editor like this:

<trix-toolbar></trix-toolbar>
<trix-editor></trix-editor>
Details
  • Trix version: 1.3.1
  • Browser name and version: Chrome 90
  • Operating system: Mac OS 11.4

hoppergee avatar Jul 10 '21 02:07 hoppergee

Refer to this:https://github.com/basecamp/trix/issues/807

brady2037 avatar Sep 18 '21 01:09 brady2037

If you wrap it in a div with some css styling it will work without problems:

<div style="display: flex; flex-direction: column-reverse">
  <trix-toolbar></trix-toolbar>
  <trix-editor></trix-editor>
</div>

frenkel avatar Jun 14 '22 08:06 frenkel