Skip to content

Commit ae77bbc

Browse files
authored
Merge pull request #844 from OutSystems/ROU-4593
ROU-4593: Fixed Balloon onBodyClick
2 parents 2b3a7a6 + 69ba7b0 commit ae77bbc

File tree

1 file changed

+4
-1
lines changed
  • src/scripts/OSFramework/OSUI/Feature/Balloon

1 file changed

+4
-1
lines changed

src/scripts/OSFramework/OSUI/Feature/Balloon/Balloon.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ namespace OSFramework.OSUI.Feature.Balloon {
4848

4949
// Method to handle the body click callback, that closes the Balloon
5050
private _bodyClickCallback(_args: string, e: MouseEvent): void {
51-
if (e.target === this.featureOptions?.anchorElem || this._isOpenedByApi) {
51+
const _eventTarget = e.target;
52+
53+
if (_eventTarget === this.featureOptions?.anchorElem || this._isOpenedByApi || this.featureElem.contains(_eventTarget as HTMLElement)) {
5254
return;
5355
}
56+
5457
if (this.isOpen) {
5558
this._toggleBalloon(false, true);
5659
e.stopPropagation();

0 commit comments

Comments
 (0)