Submitting a form containing summernote in "code view" will not post the latest changes #2164

Open
ldardini opened this Issue Dec 18, 2016 · 1 comment

Projects

None yet

2 participants

@ldardini

When a summernote textarea is used inside a form, submitting the form while in Code View, the latest changes made while in Code View are lost and not submitted.

steps to reproduce

  1. get your nativestyle.html example code
  2. change it a bit to include summernote field in a form and add a button, something like:

<form action="dumpreq.php" method=POST>
<textarea name="season" class="summernote"><p>Seasons <b>coming up</b></p></textarea>
<input type=submit></input>

  1. add a dumpreq.php code to dump the $_REQUEST variable, like:
  1. load the nativestyle.html page
  2. change to code view
  3. make some changes to the text in summernote and while still in code view
  4. submit the form
  5. you'll see the $_REQUEST is still containing the old value, losing the latest changes

browser version and os version

What is your browser and OS? Chrome, Ubuntu

Thank you for your work!

Leandro

@StudioJunkyard

I'm assuming here, in that I'm pretty sure when switching to code view, SN creates or uses a different container that isn't part of the inline form. The content of the code view are copied from that element back to the element that is inline in the form, and I think they do this to rerender the content so it looks correct when viewing the normal mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment