Disappearing scrollbars when using Object embeds?

Disappearing scrollbars when using Object embeds?

by David Scotson -
Number of replies: 4
My theme is set to have a minimum and maximum width that are reasonably close together, so it's sort of a fixed-width design.

I'm getting reports of issues on netbooks, projectors and other devices with a small number of horizontal pixels. It would appear that if you embed things via the object tag, like Moodle sometimes does for PDFs, Powerpoints, LTI integrations etc. then it prevents the browser from adding scrollbars to the page. This catches me out as my theme has a minimum width, and at the current setting this sometimes places the scrollbar of the inner embedded object just off the screen. If you know what you're doing you can use the arrow keys to scroll to the right, but if you're not aware of the issue it seems as if the inner scroll bar is just missing entirely, as the bottom scrollbar that would normally hint that there is more page that you can't see, isn't present.

I've tried Googling for some insight, but all the results are from people trying to embed an object and get rid of the scrollbars around it, rather than people who's scrollbars have gone missing.

Anyone got any pointers?
Average of ratings: -
In reply to David Scotson

Re: Disappearing scrollbars when using Object embeds?

by Mary Evans -

What about an @media { ... } setting in the css that covers for different screen widths? For example: for small devices...

@media all and (min-width: 240px) and (max-width: 500px) {
    #page {
        width: 100%;
        min-width: 100%;
    }
}

Just a thought...

Mary

In reply to Mary Evans

Re: Disappearing scrollbars when using Object embeds?

by David Scotson -
I've got a few different workarounds like that I could use, but to be honest I'm never really happy if I'm just avoiding a problem without understanding what's going on. I'm really looking for an explanation of why this would happen. At the moment I'm assuming it's a weird browser bug, but I can't shake the feeling that it's me that's doing something daft.
In reply to David Scotson

Re: Disappearing scrollbars when using Object embeds?

by Danny Wahl -

sounds like you have overflow-x:hidden; somewhere

In reply to David Scotson

Re: Disappearing scrollbars when using Object embeds?

by Sandino Nunez -

I know this is an old post, but perhaps this helps someone else, I found this issue is because for some reason the <body> tag of the html is set the property style='overflow: hidden', I do not know why this decision was made by the moodle programmers and do not know where in the code this is done.


I embedded a question2answer application on my moodle using External Tool and the option Incrust, only when I click in the External Tool this body's property is set, if I go back I can see that it disappear.


My workaround was to add a javascript in my external tool, and from that javascript quit this property(using jquery of course), is not the best but it works, and is one line of code:


$('body',window.parent.document).attr('style','');//Quit the property overflow: hidden


I found a similar bug report here:https://tracker.moodle.org/browse/MDL-31205


and some people said (Febraury 2014) that remains on moodle 2.5


Hope this helps someone else while this bug is not fixed.


Regards


Sandino