mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
always need to stop button click events as otherwise the result would be submitted to server-side eT2 handler
This commit is contained in:
parent
f8e56edc20
commit
ed05a8b6ee
@ -418,10 +418,12 @@ export class Et2Dialog extends Et2Widget(ScopedElementsMixin(SlotMixin(LionDialo
|
||||
try
|
||||
{
|
||||
let et2_widget_result = super._handleClick(ev);
|
||||
if(!et2_widget_result)
|
||||
// we always need to stop the event as otherwise the result would be submitted to server-side eT2 handler
|
||||
// which does not know what to do with it, as the dialog was initiated from client-side (no eT2 request)
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
if(et2_widget_result === false)
|
||||
{
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -434,11 +436,13 @@ export class Et2Dialog extends Et2Widget(ScopedElementsMixin(SlotMixin(LionDialo
|
||||
// Callback expects (button_id, value)
|
||||
try
|
||||
{
|
||||
let callback_result = this.callback ? this.callback(this._button_id, this.value) : true;
|
||||
let callback_result = this.callback ? this.callback(this._button_id, this.value, ev) : true;
|
||||
// we always need to stop the event as otherwise the result would be submitted to server-side eT2 handler
|
||||
// which does not know what to do with it, as the dialog was initiated from client-side (no eT2 request)
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
if(callback_result === false)
|
||||
{
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user