Opened 11 years ago

Last modified 11 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 Piotr Jasiun)

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 11 years ago by Piotr Jasiun

Description: modified (diff)

comment:2 Changed 11 years ago by Piotrek Koszuliński

Status: newconfirmed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy