+8
Planned

Don't include scrollbar in viewport setting

Asbjørn Floden 12 year бұрын updated by Sam Kirk 10 year бұрын 4

In order to properly simulate the size of an iPad or iPhone (or any other touch-based device), scrollbars should not be part of the effective viewport. Thus, a setting that allows me to "don't include scrollbars in viewport" (or similar) would be greatly appreciated!


Love this tool!

Answer

Answer
Planned

I completely understand why this is needed and it is the no. 1 priority.

Answer
Planned

I completely understand why this is needed and it is the no. 1 priority.

What's up with this? Any word? I'd expect the #1 priority from two years ago would be implemented by now, eh? :)
Yeah, it's on hold... It's not as easy as it seems.

The thing is I can't just measure the scrollbar width/height (which is different based on OS and user settings) and just add it to the window size, because a page might have a vertical scrollbar at 640px height but it might not have at 720px. Also, a page might trigger the scrollbar on user interaction: just think about an accordion menu which is expanded on click and increases the body's height, triggering the scrollbars, which will narrow the viewport...

Anyway, I decided the best way to handle it would be to completely hide all the scrollbars on resize (using ::-webkit-scrollbar) and dynamically add some custom scrollbars using JavaScript and handle scroll events myself. This would give it more of a mobile look and feel, but there are still some gotchas.
For example, what should happen after you resize the window and navigate to some other page of the site you're testing? The script injected by the extension is lost and the default scrollbars will be visible. Should the extension remember that this tab had custom scrollbars and auto-enable them on page load? If so, what if the user wants the default back? Should there be a button in the extension's drop-down menu to toggle the custom scrollbars?

So, you see, there are lots of questions to be answered and I didn't have the time... (After all, this is just a pet project that doesn't put food on my table :D )

Still, I started working on a new version and I already have a functional prototype of the custom scrollbars I mentioned above, but I can't say when a beta version will be ready for the public...
Sure, that all makes sense. Good to know it hasn't been abandoned. I didn't realize that the viewport area would be defined by portions of the application window that are not actually inside the drawing area. 

I guess the other option would be to only use a mac :)

thanks though, please keep it up!