Open
Description
The library does not seem to have a detection of nested HTML elements with titles, it seems.
Minimal example:
<!doctype html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-powertip@1.3.2/dist/jquery.powertip.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/jquery-powertip@1.3.2/dist/css/jquery.powertip.min.css" rel="stylesheet" />
<script type="text/javascript">
$(document).ready(function() {
// Fire up PowerTip:
$("[title]").powerTip({ smartPlacement: true });
});
</script>
</head>
<body>
<ul>
<li title="parent">
Parent element
<ul>
<li title="child">Child element</li>
</ul>
</li>
</ul>
</body>
</html>
You might see how hovering the child element confuses the tooltip.
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
stevenbenner commentedon Feb 13, 2024
Thank you for the bug report. As well as the helpful test case.
I can reproduce this issue with your example code. Placing the mouse cursor over the child element causes the tooltip for the child to open, then close, then the tooltip for the parent opens.
I believe that this particular case is event bubbling causing the parent to be queued after the child. I could probably just capture or stop bubbling. I'll look into it.
dertuxmalwieder commentedon Feb 13, 2024
Thank you. :-)