Skip to content

Closing tooltip on click outside body #728

Open
@tdeniau-sticky

Description

@tdeniau-sticky

Currently only clicks on elements other than the tooltip inside the body are closing it.

I have a page where I display the tooltip at the bottom of the page and instinctively everybody clicks on the bottom, outside the body to close it and nothing happens.

The code responsible for this behavior seems to be the following:

$body.on(eventNames, function(event) {

        if (self._touchIsMeaningfulEvent(event)) {

            self._touchRecordEvent(event);

            if (!self.__options.interactive || !$.contains(self._$tooltip[0], event.target)) {
                self._close(event);
            }
        }
    });

Could you please handle clicks outside document body ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions