Protip icon indicating copy to clipboard operation
Protip copied to clipboard

protip not hide in random cases owner element hides itself

Open lbrevity opened this issue 6 years ago • 5 comments

Hello, I have following in my code

<div class="con exists" id="Section1">
    <input id="course_slide" maxlength="250" type="text" name="slide1" />
    <a class="ic-btn add protip" data-pt-position="top"  data-pt-scheme="aqua"  data-pt-title="Add"  id="addLabel_slide" onclick="add();">
        <span class="glyphicon glyphicon-ok"></span>
    </a>
</div>

It displays proper on hover of element, But after one ajax call inside add() function , I remove this div using jquery but it still displays tooltip. Note : If i click f12 then it hides.

lbrevity avatar Mar 28 '19 12:03 lbrevity

Can you show me the callback of the Ajax call please. You can also try data-pt-target="true" which will place the tooltip inside you DOM element thus removing both. But yes, by default it should get removed.

wintercounter avatar Mar 28 '19 12:03 wintercounter

Hi @wintercounter I'm just doing $('#Section1').remove(); inside my ajax call response

lbrevity avatar Mar 28 '19 12:03 lbrevity

And Yes @wintercounter , As per your suggestion I tried data-pt-target="true", but it's not showing even.

lbrevity avatar Mar 28 '19 12:03 lbrevity

I could reproduce the issue. https://jsfiddle.net/9kt3hfpj/1/ It probably has been introduced with a recent change as wiyh older versions it's working. You can you $('#Section1').protipHideInside().remove() as a workaround until it's fixed.

wintercounter avatar Mar 28 '19 13:03 wintercounter

@wintercounter Oh thanks!! it works as of now!! Saved my day :+1:

lbrevity avatar Mar 28 '19 13:03 lbrevity