Enterprise: Tooltip: Disabled input/button tooltip cannot be updated

Created on 8 Dec 2019  ·  3Comments  ·  Source: infor-design/enterprise

Describe the bug
As Described here
https://github.com/infor-design/enterprise/issues/453#issuecomment-562770921

Following proposed solution

<button id="test" class="btn-primary" type="button" title="btn-primary title/tooltip" disabled>
        <div class="disabled-tooltip" title="btn-primary title/tooltip"></div>
        Action
</button>

Is in fact two tooltip being initialized, one in the disabled and then one for the div element. The first one being initialized by

$('body').initialize({ locale: initialLocale });
and then the second being init by the following line
$('div[title]').tooltip();

To Reproduce
Steps to reproduce the behavior:

  1. Use tooltip on a disabled button and init the page as usual
  2. Update the tooltip with new text
  3. See error

Or

  1. Go to the following page
  2. Open browser console and enter $('#test').data("tooltip").updated({ content: "hello world"})
  3. See error

Expected behavior
Should display an updated tooltip, but the old tooltip text is displayed instead.

Version
4.23.x

[3] type

All 3 comments

My thought is we should make the tooltip plugin find teh div and handle the tooltip just on that. But can you clarify the commands you use to reproduce this?

  1. Init tooltip on disabled button
  2. Update tooltip with new text

Im not 100% sure i understand exactly what to do to see the issue

Updated issue description

Descoping some older issues we didnt get a chance to complete.

Was this page helpful?
0 / 5 - 0 ratings