mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 12:41:10 +01:00
Fix mail's send button does not work in some occasions:
- CKEditor has its own submit handler which was making conflict with our autocomplete submit
This commit is contained in:
parent
a9f7fbc31d
commit
187406187b
@ -598,7 +598,11 @@ etemplate2.prototype.autocomplete_fixer = function ()
|
||||
var form = self.DOMContainer;
|
||||
if (form)
|
||||
{
|
||||
form.onsubmit = function(){return false;};
|
||||
// Stop submit propagation in order to not fire other possible submit events
|
||||
// for instance, CKEditor has its own submit event handler which we do not want to
|
||||
// fire that on submit
|
||||
form.onsubmit = function(e){e.stopPropagation();};
|
||||
|
||||
// Firefox give a security warning when transmitting to "about:blank" from a https site
|
||||
// we work around that by giving existing etemplate/empty.html url
|
||||
// Safari shows same warning, thought Chrome userAgent also includes Safari
|
||||
@ -606,7 +610,9 @@ etemplate2.prototype.autocomplete_fixer = function ()
|
||||
{
|
||||
jQuery(form).attr({action: egw.webserverUrl+'/etemplate/empty.html',method:'post'});
|
||||
}
|
||||
form.submit();
|
||||
// need to trigger submit because submit() would not trigger onsubmit event
|
||||
// since the submit does not get fired directly via user interaction.
|
||||
jQuery(form).trigger('submit');
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user