FLUID-5672: The tooltip should be able to use the idToContent to set the jQuery Tooltip Widget items option

Metadata

Source
FLUID-5672
Type
Improvement
Priority
Major
Status
Open
Resolution
N/A
Assignee
N/A
Reporter
Justin Obara
Created
2015-05-29T07:44:32.237-0400
Updated
2021-07-29T01:32:48.839-0400
Versions
N/A
Fixed Versions
  1. 5.0
Component
  1. Tooltip

Description

Currently the tooltip component takes in an option for "items" which gets passed down to the widgetOptions and eventually makes it way directly into the underlying jQuery UI tooltip widget. The items option is used to define which elements should show the tooltip. http://api.jqueryui.com/tooltip/#option-items

The default in Tooltips.js is set to "*", which means all elements. The result of this is that if a tooltip is set for an element that has child elements, a new tooltip is created as the mouse passes over each of these DOM elements instead of just the parent. (see: FLOE-361)

An alternative solution could be to make use of the idToConent to calculate the correct elements, by ID, to use for the items. However, because the tooltip supports both idToContent and a straight content model the items option is still required for the latter case. We will need to have appropriate logic to know when to attempt to calculate the items as well as the ability to update the items if any of the ID's in the idToContent model object are modified after initialization.

Comments