Skip to content

Tooltips returned with content from a call to an endpoint do not work properly on the page. #20

Description

@stanalyst

Description

I'm not sure this is a bug, an enhancement, or a documentation update.

Currently, if the content returned by a call to an endpoint includes tags with tooltips - the tooltips wouldn't display properly. Discovered that you have to reinitialize the tooltips on the page after the swap completes so that they will display properly.

related post on RocketChat

Actual Behavior

When an endpoint is called that includes tags with tooltips in the returned content - the tooltips do not display on the page.

Expected Behavior

Any tooltips returned with the content should work.

Steps to Reproduce

  • Setup a Lava application with an endpoint that returns a link or div with a tooltip. Maybe something like this.
    <span data-toggle="tooltip" title data-original-title="{{ description }}">{{ value }}</span>
  • setup the lava application content block with a way to trigger a call to the endpoint
  • go the page with the lava application content block and trigger the endpoint call
  • observe behavior of the tooltip on the page

NOTE: I was able to workaround this issue by including the following code with the returned content from the endpoint:

 <script>
       $('[data-toggle="tooltip"]').tooltip();
</script>

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • Try to reproduce the problem on a fresh install or on the demo site.

Rock Version

16.10 (1.16.10.2)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions