Skip to content

Fix animation class remove on lightbox modal close#5911

Closed
sztobar wants to merge 1 commit intoelementor:masterfrom
sztobar:lightbox-close
Closed

Fix animation class remove on lightbox modal close#5911
sztobar wants to merge 1 commit intoelementor:masterfrom
sztobar:lightbox-close

Conversation

@sztobar
Copy link
Copy Markdown
Contributor

@sztobar sztobar commented Oct 14, 2018

PR Checklist

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Summary

This PR can be summarized in the following changelog entry:

  • lightbox modal close removes animation class from correct element

Description

An explanation of what is done in this PR

  • onHide callback in lightbox module was clearing animated class from incorrect widget element (widgetContent rather than message). It also wasn't removing modalOptions.entranceAnimation class from settings.
  • I found this issue when I needed to customize lightbox a little. I needed image property width which was equal to 0 on every but first modal opening. Normally - animation is added after 10ms timeout which enables to get proper width of the image. Because animation is not removed correctly, every next modal showing has animation class already there.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended
  • Docs have been added / updated (for bug fixes / features)

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Oct 14, 2018

CLA assistant check
All committers have signed the CLA.

@KingYes
Copy link
Copy Markdown
Member

KingYes commented Nov 6, 2018

Merge by this PR: #6063

Thanks

@KingYes KingYes closed this Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants