craftpip / jquery-confirm

A multipurpose plugin for alert, confirm & dialog, with extended features.
http://craftpip.github.io/jquery-confirm/
MIT License
1.87k stars 509 forks source link

Content height with AJAX #326

Open disjointed opened 7 years ago

disjointed commented 7 years ago

jquery-confirm version: v3.x.x

I'm submitting a ... [x] bug report [ ] feature request [ ] support request

Current behavior: While loading content via AJAX, .jconfirm-content-pane doesn't have a smooth height transition, it just jumps to content height value. But if contents height is changed after that - .jconfirm-content-pane's height changes smoothly as expected. It's happening since v3.3.0. smoothContent is set to true.

Expected behavior: Prior to v3.3.0, when you load content via AJAX call and, after loading is finished (loading spinner is gone), .jconfirm-content-pane would smoothly change its height value to fit the content height.

Steps to reproduce: Described above.

Related code: After some digging I've found what the problem is:

...
.jconfirm .jconfirm-box div.jconfirm-content-pane {
  ...
  height: auto;
  ...
}
...

If you change height from "auto" to "0" the problem vanishes (at least for me). I think it's because CSS property "transition" doesn't work with "auto" values.

Other information: https://github.com/craftpip/jquery-confirm/blob/00b4a03e62d4122e302bc5e3064aa975f827cdcb/css/jquery-confirm.css#L340

filipemontt commented 7 years ago

On mobile not show content loaded, if click out show.... how to fix this?