Details
-
Bug
-
Resolution: Fixed
-
Major
-
10.8
-
None
-
Easy
-
N/A
-
N/A
-
Description
Open a page in edit mode then open the JavaScript console and enter this:
require(['jquery', 'xwiki-events-bridge'], function($) { $(document).on('xwiki:actions:beforeSave', function(event) { event.preventDefault() }); });
Save the page. The submit is not prevented.
The workaround is to stop the original event with:
require(['jquery', 'xwiki-events-bridge'], function($) { $(document).on('xwiki:actions:beforeSave', function(event, data) { data.originalEvent.stop(); }); });
but this has 2 problems:
- you need to be aware that the original event exists
- you need to use old Prototype.js code to stop the event (because the xwiki:actions:* events are triggered from Prototype.js)
Attachments
Issue Links
- relates to
-
CKEDITOR-229 Changes in the document are lost upon save if the content serialization fails
- Closed