Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply width/height to hidden elements on resize when duration specified #362

Closed
techfg opened this issue Jan 30, 2021 · 0 comments · Fixed by #363
Closed

Apply width/height to hidden elements on resize when duration specified #362

techfg opened this issue Jan 30, 2021 · 0 comments · Fixed by #363
Labels

Comments

@techfg
Copy link
Collaborator

techfg commented Jan 30, 2021

Describe the bug
In #357, when resize is called with a duration specified, a fix was applied to filter the animation to only act on visible elements. In short, this would exclude altImages which is actually OK as they don't require height/width.

However, in the unlikely event that someone using IM is relying on those elements having an explicit height/width, need to ensure 100% backwards compat and apply the css to the hidden elements as well - it just shouldn't be done using animate to ensure that jQuery doesn't make those elements visible (the issue that #357 addressed).

To Reproduce
Steps to reproduce the behavior:

  1. Open AltImages example
  2. Execute $('img').mapster('resize', 1000, null, 25, null) in console
  3. Inspect HTML and width/height will not be specified on altimages

Expected behavior
Ensure width/height is specified on altimages but that they remain display==='none'

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
N/A

techfg added a commit that referenced this issue Jan 30, 2021
Resolves #362 - apply css to hidden els on resize when duration specified
@techfg techfg added the bug label Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant