While the dialog is visible, scroll bars are hidden on the body/html. - Can I modify this behavior?

24 views
Skip to first unread message

Michael McFarland

unread,
Feb 4, 2015, 4:04:39 PM2/4/15
to duran...@googlegroups.com
I was reading about Dialog contexts and came across the statement "While the dialog is visible, scroll bars are hidden on the body/html." I would like to modify just this behavior. My app has a background image and I'm keeping the scrollbar visible at all times to keep it from re-sizing the image.

The docs I found on dialog contexts looks really bare. Could anybody point in the right direction to remove or modify the behavior that is hiding the scroll bar?

Thanks, Michael

Michael McFarland

unread,
Feb 11, 2015, 2:51:00 PM2/11/15
to duran...@googlegroups.com
Posted this on stackoverflow.. and am getting the same response I got here :(

Rob Eisenberg

unread,
Feb 11, 2015, 3:04:22 PM2/11/15
to Michael McFarland, duran...@googlegroups.com
You can create your own dialog context. There's not a lot of documentation on that, but it is extensible. Have a look at the dialog module's source code to see how it's done.
Worst case scenario, you can customize the one or two lines in the plugin itself to fix your issue, then you can use that as your own plugin to load instead of the OOTB one.

--
You received this message because you are subscribed to the Google Groups "DurandalJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to durandaljs+...@googlegroups.com.
Visit this group at http://groups.google.com/group/durandaljs.
To view this discussion on the web visit https://groups.google.com/d/msgid/durandaljs/9f234ab6-bbd7-4917-a506-0016331a1222%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Rob Eisenberg,
President - Blue Spire
www.durandaljs.com

Michael McFarland

unread,
Feb 11, 2015, 3:38:20 PM2/11/15
to duran...@googlegroups.com, michaelc...@gmail.com, r...@bluespire.com
Thanks for the answer! I looked in the dialog.js and found the line that was hiding the scroll bars. Before I saw your answer I had realized that I could also just add !important on my html overflow-y - I might stick with this to avoid modifying durandal code. 

I'm looking forward to experimenting with Aurelia!

Michael

Rob Eisenberg

unread,
Feb 11, 2015, 3:41:35 PM2/11/15
to Michael McFarland, duran...@googlegroups.com
Sounds good ;)

Kevin McGee

unread,
Feb 12, 2015, 4:36:54 PM2/12/15
to duran...@googlegroups.com, michaelc...@gmail.com, r...@bluespire.com
Finally!
A legit use of "!important;" :) :)
Reply all
Reply to author
Forward
0 new messages