kevinchappell / formBuilder

A jQuery plugin for drag and drop form creation
https://formbuilder.online
MIT License
2.63k stars 1.39k forks source link

Firefox creates <br> #1156

Open mathi1993 opened 3 years ago

mathi1993 commented 3 years ago

Description: If you create a textfield, change the label of the field and save, there will be a break inside the label, right after the label (Inside the html label).

Environment Details:

Expected Behavior: Don't create a break element

Actual Behavior: break element gets created after the label (inside the html label)

Steps to Reproduce:

  1. Create a textfield (https://formbuilder.online/)
  2. Edit the textfield and change the label
  3. Check the "required checkbox"
  4. Save

Screenshot - (optional)

grafik

Allenci commented 3 years ago

I facing this case in Chrome when formRender() , I use $('br').remove() to solve this, it remove all br tag in document

lucasnetau commented 1 year ago

Firefox, Chrome and Safari leave a trailing <br> tag in contenteditable fields. Current workaround is to attach to the change event of the input/textareas and remove the trailing <br>