Opened 12 years ago
Last modified 12 years ago
#10748 confirmed Task
Prevent save event instead of submit
| Reported by: | Piotr Jasiun | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | |
| Keywords: | Cc: |
Description (last modified by )
Working on #10689 I realized that this part of code works magicly:
// #8031 If textarea had required attribute and editor is empty fire 'required' event and if
// it was cancelled, prevent submitting the form.
if ( editor._.required && !element.getValue() && editor.fire( 'required' ) === false ) {
// When user press save button event (evt) is undefined (see save plugin).
// This method works because it throws error so originalSubmit won't be called.
// Also because of hack there is try-cache in save plugin so error won't be shown.
evt.data.preventDefault();
It should be fixed using save event instead of submit.
Change History (2)
comment:1 Changed 12 years ago by
| Description: | modified (diff) |
|---|
comment:2 Changed 12 years ago by
| Status: | new → confirmed |
|---|
