Opened 9 years ago

Closed 9 years ago

#10092 closed bug (invalid)

Tooltip: Clearing of title attribute while tooltip is open gets reverted on close

Reported by: ijcheung Owned by: ijcheung
Priority: minor Milestone: none
Component: ui.tooltip Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

Original title attribute is restored when tooltip is closed if it is set to an empty string while tooltip is open.

Change History (9)

comment:1 Changed 9 years ago by tj.vantoll

Status: newopen
Summary: Clearing of title attribute while tooltip is open gets reverted on closeTooltip: Clearing of title attribute while tooltip is open gets reverted on close

comment:2 Changed 9 years ago by joebot0101

This seems a bit of a catch-22, as the current design relies on the title attribute being empty while the tooltip is open in order to prevent native tooltips from appearing during mouseover events.

It seems like you'd have to detect the change to title immediately in order to handle the case where the desire is to keep the title attribute as an empty value, however trying to detect the change to the title attribute while the tooltip is open has a few problems as a concept:

  1. The current implementation works for every case but the empty string
  2. Browser support for Mutation Events / MutationObserver is limited
  3. Is the attempt to change the title attribute enough to trigger a detectable event, regardless of the value? (i.e. will no event be fired if the old value and new value are the same, as would be the case here since when tooltip is open the title attribute is indeed empty)

An immediate workaround would be to set the title attr to a single space if you need to clear the title while the tooltip is open, this will at least let you achieve the desired result.

Anyone else have any ideas?

Version 0, edited 9 years ago by joebot0101 (next)

comment:3 Changed 9 years ago by joebot0101

Doh, that's not a good workaround, as you still get a single space tooltip. Perhaps trimming the title value and checking for an empty string before copying it over to data-ui-tooltip-title on .open would allow the single-space workaround, but that may not be an acceptable solution.

Last edited 9 years ago by joebot0101 (previous) (diff)

comment:4 Changed 9 years ago by Scott González

Owner: set to ijcheung
Status: openpending

@ijcheung Can you explain why you're clearing the title while the tooltip is visible?

comment:5 Changed 9 years ago by ijcheung

Status: pendingnew

Well, I was using it for an error message. When the item is double clicked it should clear the error and then recheck for the error.

comment:6 Changed 9 years ago by Scott González

Status: newpending

That sounds like pretty strange UX. Are there any other apps or sites that work like that? How do users know to do this? Why was this decision made for your site?

comment:7 Changed 9 years ago by ijcheung

Status: pendingnew

It's actually a node-webkit application. Each element would represent a file on the system. Since changes can be made to the file external to the application, this would just give the user the ability to retry after doing just that. There are plenty of desktop applications that do this, so from a UX standpoint, it's a learned behavior.

comment:8 Changed 9 years ago by Jörn Zaefferer

Status: newpending

Can't you just close the tooltip before changing the title attribute?

comment:9 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.