Skip to content

Commit

Permalink
Merge pull request #844 from OutSystems/ROU-4593
Browse files Browse the repository at this point in the history
ROU-4593: Fixed Balloon onBodyClick
  • Loading branch information
BenOsodrac authored Oct 17, 2023
2 parents 2b3a7a6 + 69ba7b0 commit ae77bbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scripts/OSFramework/OSUI/Feature/Balloon/Balloon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ namespace OSFramework.OSUI.Feature.Balloon {

// Method to handle the body click callback, that closes the Balloon
private _bodyClickCallback(_args: string, e: MouseEvent): void {
if (e.target === this.featureOptions?.anchorElem || this._isOpenedByApi) {
const _eventTarget = e.target;

if (_eventTarget === this.featureOptions?.anchorElem || this._isOpenedByApi || this.featureElem.contains(_eventTarget as HTMLElement)) {
return;
}

if (this.isOpen) {
this._toggleBalloon(false, true);
e.stopPropagation();
Expand Down

0 comments on commit ae77bbc

Please sign in to comment.