GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.06k forks source link

[BUG] - Checkbox Traits are not rendered correctly #1435

Closed benschiefer closed 6 years ago

benschiefer commented 6 years ago

Checkbox type traits are not getting shown as "checked" in the component settings.

To reproduce:

  1. Import markup
    <input type="checkbox" checked />
  2. Select the input element in the canvas
  3. Go to Component Settings
  4. Notice that the Checked setting is not checked.

The same issue can be noticed for the "required" attribute.

Similarly, if you import

<input required />

or

<input required=""/>

or

<input required="required"/>

the component settings do not properly show that element as being Required.

Expectation: If the attribute is present, and its value is an empty string or a value that is an ASCII case-insensitive match for the attribute’s canonical name, with no leading or trailing white space, then the Checkbox in component settings should be CHECKED

artf commented 6 years ago

Should be fixed with the latest https://github.com/artf/grapesjs/releases/tag/v0.14.33 and https://github.com/artf/grapesjs-plugin-forms/releases/tag/v1.0.1 (changed the name of the plugin gjs-plugin-forms -> grapesjs-plugin-forms)

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.