Skip to content

Tooltips can't be dismissed in mobile Safari #6153

Closed

Description

@spadgett

When I press on a tooltip link in the web console create form, I can't dismiss the tooltip, and it covers form fields. Pressing elsewhere on the page or on the link again doesn't hide the tooltip. The only workaround I've found is press another link or button.

/cc @jwforres

Activity

  1. added
    kind/bug
    on Dec 1, 2015
  2. spadgett commented on Dec 2, 2015

    @spadgett
    MemberAuthor
  3. spadgett commented on Dec 2, 2015

    @spadgett
    MemberAuthor
  4. spadgett commented on Dec 2, 2015

    @spadgett
    MemberAuthor

    touchstart on the body element doesn't always fire in my testing. I'm guessing something is stopping event propagation.

    How do you feel about this fix? It's a bit hacky, but seems to work well.

        // Workaround for tooltips and popovers not closing when the screen is
        // touched elsewhere. Specifically target iOS to avoid changing the cursor
        // on other devices like touch-enabled laptops.
        if (navigator.userAgent.match(/(iphone|ipad)/i)) {
          $('body').css('cursor', 'pointer');
        }
    
  5. liggitt commented on Dec 2, 2015

    @liggitt
    Contributor

    ?

  6. spadgett commented on Dec 2, 2015

    @spadgett
    MemberAuthor
  7. jwforres commented on Dec 12, 2016

    @jwforres
    Member

    @spadgett i prefer the version in this comment where the hack CSS is only added while the popup is visible twbs/bootstrap#16028 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/usabilitycomponent/webkind/bugpriority/P2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions