Skip to content

[hover card] fix bug for quickly enter/leave card cannot dismiss card correctly#3606

Merged
Jahnp merged 2 commits into
microsoft:masterfrom
MirandaGe:lingge/hover-card/open-and-dismiss
Jan 22, 2018
Merged

[hover card] fix bug for quickly enter/leave card cannot dismiss card correctly#3606
Jahnp merged 2 commits into
microsoft:masterfrom
MirandaGe:lingge/hover-card/open-and-dismiss

Conversation

@MirandaGe

@MirandaGe MirandaGe commented Dec 20, 2017

Copy link
Copy Markdown
Member

Pull request checklist

Description of changes

  1. setState cannot be used in componentWillUpdate
  2. did not clear dismiss timer correctly
  3. setState according to prev state should be done in callback function in setState.

Focus areas to test

tested on local build branch

@lynamemi lynamemi requested a review from atneik December 21, 2017 16:19
@Jahnp

Jahnp commented Jan 3, 2018

Copy link
Copy Markdown
Member

@atneik @chaofeng2014, can one of you take a look at this?

@kristoferbrown kristoferbrown left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but would be great if @atneik could take a look!


@autobind
private _executeCardOpen(ev: MouseEvent) {
this._async.clearTimeout(this._openTimerId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move this._async.clearTimeout(this._dismissTimerId) in _cardOpen here for consistency with _executeCardDismiss?

@Jahnp Jahnp merged commit a541f4e into microsoft:master Jan 22, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
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.

[hover card] if I quickly enter/leave the hover card, the card does not dismiss as expected sometimes

4 participants