WPanel expand/collapse broken with Bootstrap responsive features
I'm playing a bit with bootstrap responsive features, and I got stuck on this problem.
I've created a WPanel with the "hidden-desktop" css class.
On Wt 3.3.0 it works correctly. On a fresh git snapshot installation it just gets stuck, sometimes I can expand it once, but then i can't get it to collapse anymore.
My other "regular" WPanels work correctly.
Updated by Koen Deforche about 9 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
I can't reproduce this with latest git --- e.g. when changing the CollapsiblePanel example in the widget gallery it seems to perform as expected?
I noticed that this progressive feature uses 'display: inherit' which isn't something that I expect to work properly on all browsers however?
Updated by Marco Gulino about 9 years ago
Thanks for your reply!
It was tricky to reply in a "vanilla" page, but I found the real trigger.
You have to:
- create the panel adding a "hidden-desktop", or "visible-phone" css class
- set the "collapsible" and "collapsed" properties to true
- add an animation (I use the SlideInFromTop, for instance)
- expand it after a while (maybe using a WTimer, in my app I did it with user event clicks, instead).
- load the page in "desktop" mode, meaning with a wide window width, and resize the window after the panel gets expanded by the timer.
You can see an example here: http://pastebin.ca/2406365 and as I said, the panel gets stuck, you can't collapse it anymore.
You might of course wonder why I'm trying to expand a hidden panel, but that's the point of responsive code: having the panel always there (and therefore responding to events), but hidden if we're watching the page in desktop mode.
As a side note, the animations are also a bit weird too, if the animation duration is too short the panel gets stuck in a hibryd state.