Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Fix transitionTimeout replace #1847

Closed
wants to merge 1 commit into from
Closed

Conversation

tamtakoe
Copy link

If tooltip hid two or more times in series next show canceled only last remove deferred and tooltip removed after show

If tooltip hid two or more times in series next show canceled only last remove deferred and tooltip remove after show
@bekos
Copy link
Contributor

bekos commented Mar 4, 2014

@tamtakoe Can you add a test for this? From your description I am not really sure I understand the issue you try to solve. ping @chrisirhc Opinion?

@tamtakoe
Copy link
Author

My simplify case: I combined own form error directive with this tooltip. Error tooltip is closed each keypress if form valid and is opened if form invalid. When I open tooltip it cancel last hide deferred, but previous hide deferred was lost (I closed tooltip some times) and it deffered close tooltip which I opened.

Now I enforce check private flag tt_isOpen

} else if (elScope && elScope.tt_isOpen) {
    //TODO Remove tt_isOpen check,
    // when tooltip bug will be fixed https://github.com/angular-ui/bootstrap/pull/1847
    element.triggerHandler('close');
}

Unfortunately I don't know how make tests. I must clone project, make environment... It will be long without help

@chrisirhc chrisirhc self-assigned this Mar 17, 2014
@chrisirhc
Copy link
Contributor

From what I gather in the explanation, it seems that if the tooltip's hide is somehow more than once before the transition completes, it might close the tooltip even after show is triggered. Working on it now.

chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this pull request Mar 17, 2014
Add logic to handle cases where hide/show can be called multiple times
even before their timeouts complete.

This is more ugly logic to handle degenerate cases. Hopefully switching
over to ngAnimate and cleaning up the logic of tooltips will be better.

Fixes angular-ui#1847
@chrisirhc chrisirhc closed this in 2b429f5 May 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants