diegoles / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Hovercard anchor is lost when using hide transition effect #515

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
1. HTML:
<a tooltip>a</a><a tooltip>b</a>
2. JS:
var hc = new goog.ui.HoverCard({ "A": "tooltip" });
hc.setTransition(showTransition, hideTransition)
hc.addEventListener 'beforeshow' ->
  hc.getAnchorElement() === undefined

3. move your mouse from link a to link b

What is the expected output? What do you see instead?
expected: hc.anchor is link b.
actual: hc.anchor is undefined.

What version of the product are you using? On what operating system?
latest.
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like 
Gecko) Chrome/23.0.1271.64 Safari/537.11"

Please provide any additional information below.

stack trace:

goog.ui.Tooltip.onHide_ (tooltip.js:524)

this.anchor = undefined; // this.getState() === goog.ui.Tooltip.State.WAITING_TOSHOW goog.ui.AdvancedTooltip.onHide (advancedtooltip.js:205) goog.ui.HoverCard.onHide (hovercard.js:344) goog.ui.PopupBase.continueHidingPopup (popupbase.js:624) (anonymous function) (base.js:1093) goog.events.Listener.handleEvent (listener.js:178) goog.events.fireListener (events.js:782) goog.events.fireListeners (events.js:758) goog.events.dispatchEvent (events.js:881) goog.events.EventTarget.dispatchEvent (eventtarget.js:181) goog.fx.Animation.dispatchAnimationEvent (animation.js:451) goog.fx.TransitionBase.onEnd (transitionbase.js:176) goog.fx.dom.PredefinedEffect.onEnd (dom.js:117) goog.fx.dom.FadeOutAndHide.onEnd (dom.js:508) goog.fx.Animation.stop (animation.js:306) goog.ui.PopupBase.setVisible (popupbase.js:438) if (this.hideTransition) this.hideTransition.stop(); // state === goog.fx.TransitionBase.State.PLAYING goog.ui.Tooltip.positionAndShow_ (tooltip.js:614) this.anchor = el; goog.ui.Tooltip.maybeShow (tooltip.js:551) goog.ui.HoverCard.maybeShow (hovercard.js:403)

Note: we cannot accept patches without the contributor license agreement being signed. See http://code.google.com/p/closure- library/wiki/Contributors for more info.


Original issue reported on code.google.com by `ambar....@gmail.com` on 20 Nov 2012 at 8:24