developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#687 closed bug (fixed)

jForms: wymeditor fields don't get updated before javascript form check

Reported by: Julien Owned by: Julien
Priority: normal Milestone: Jelix 1.1 beta 1
Component: jelix:forms Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: #676 Documentation needed: no
Hosting Provider: Php version:

Description

Reported by foxmask in #676, when we have a mandatory wymeditor with text inside, this bug occurs because the JS check is triggered when the form is submitted, and this happens just before the wymeditors get notified of the submit and so the update of the textareas' content is done after the check, that fails.

Submitting the form again passes the check.

In the patch, I attached custom event "jFormsUpdateFields" to the form element using jQuery, and triggered this event just before starting the check.

Tried it with firefox3, opera9, epiphany on ubuntu and firefox3, firefox2, opera9, safari3, ie6 on xp pro sp2, all is OK. My IE7 (standalone install) is broken about displaying alert boxes, but the form isn't sent, so I think all is OK.

Attachments (3)

687-jForms-wysiwyg-editor-update-before-check.diff (1.4 KB) - added by Julien 12 years ago.
687-jForms-wysiwyg-editor-update-before-check-2.diff (2.0 KB) - added by Julien 12 years ago.
687-jForms-wysiwyg-editor-update-before-check-3.diff (3.0 KB) - added by Julien 12 years ago.
patch after #688 has been fixed

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by Julien

  • Status changed from new to assigned

comment:2 Changed 12 years ago by Julien

need to commit #688 before

comment:3 Changed 12 years ago by laurentj

  • Component changed from jelix to jelix:forms
  • Milestone set to Jelix 1.1 beta 1
  • Version changed from 1.0.5 to trunk

comment:4 Changed 12 years ago by Julien

just added a new patch which doesn't make jQuery required all the time (so #688 may become invalid)

Changed 12 years ago by Julien

patch after #688 has been fixed

comment:5 Changed 12 years ago by laurentj

  • review changed from review? to review+

it's ok

comment:6 Changed 12 years ago by Julien

  • Resolution set to fixed
  • Status changed from assigned to closed

commited in the trunk

Note: See TracTickets for help on using tickets.