mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 21:01:30 +02: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
|
try
|
||||||
{
|
{
|
||||||
let et2_widget_result = super._handleClick(ev);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -434,11 +436,13 @@ export class Et2Dialog extends Et2Widget(ScopedElementsMixin(SlotMixin(LionDialo
|
|||||||
// Callback expects (button_id, value)
|
// Callback expects (button_id, value)
|
||||||
try
|
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)
|
if(callback_result === false)
|
||||||
{
|
{
|
||||||
ev.preventDefault();
|
|
||||||
ev.stopPropagation();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user