Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

'hideOnClickOutside: true' fails when used with 'close: true'

We have the following setup:

        Tipped.create(
            selector,
            id,
            {
                close: true,// adds the "closing X"
                hideOn: {// turn on hover away close for mouse users.
                    element: 'mouseleave',
                    tooltip: 'mouseenter'
                },
                hideOthers: true,// Hides all visible tooltips before showing the tooltip
                hideOnClickOutside: true// hides tooltip if clicked outside the box.
            }
        );

We also tried it with the following combinations:

            {
                close: true,// adds the "closing X"
                hideOthers: true,// Hides all visible tooltips before showing the tooltip
                hideOnClickOutside: true// hides tooltip if clicked outside the box.
            }

and

            {
                close: true,// adds the "closing X"
                hideOnClickOutside: true// hides tooltip if clicked outside the box.
            }

and even with our own close button with a class of 'close-tooltip' as you suggested in /discussion/comment/12797 with the following settings:

            {
                hideOnClickOutside: true// hides tooltip if clicked outside the box.
            }

With all of the above settings, in an iPhone, if you click on the close 'x' or anywhere 'inside' the tooltip it works, but as soon as you click outside a tooltip to close it, clicking the tooltip link again no longer brings up the tooltip. Clicking a different tooltip link works, and then the original link will work again, else it gets stuck, but as soon as you click outside to close it, it gets closes and will no longer work.

Comments

  • edited October 2016

    There's a demonstration on the Tipped website that uses hideOnClickOutside which I can open multiple times without that issue. It uses click events though, perhaps that is masking some kind of issue with the default mouseenter/leave.

    I know that iOS has a special way of handling events, it keeps an internal focus on an element which only changes when another interactable element is clicked. The tap outside the tooltip might not register as something that has to take focus away in every case. That's probably why you have to click something else first, it moves the internal focus away allowing a second click.

Sign In or Register to comment.