. . . "I tried everything including using event.stopPropagation() in the 'beforeclose' event of the htmlDivBalloon but still nothing works." .