pikabu icon indicating copy to clipboard operation
pikabu copied to clipboard

Desktop Chrome is given a wrong height due to Chrome for Android Check

Open 0Neji opened this issue 10 years ago • 4 comments

For some reason when Pikabu adds the height, it's much bigger than the actual viewport height. I've been at this a few hours and I can't locate what's causing it. I'm using Chrome 36. I'm wondering if it's something within my CSS files but I haven't been able to track it down.

var windowHeight = this.device.isNewChrome ? window.outerHeight : $(window).height();

I've fixed the issue by removing the check for Chrome but I'm a little wary of keeping this as I'm not sure I understand the reason this check is made. I get that window.outerHeight grabs the height of everything including toolbars etc? Just not sure why you'd need to do that.

0Neji avatar Aug 04 '14 15:08 0Neji

@0Neji Looks like this is something we added in for Chrome on Mobile devices but are now getting weird interactions with on Desktop browsers. Thanks for finding this issue! Feel free to remove that check in your code but please make sure to check whether this causes any undesired issues on Chrome for Android.

We'll be releasing 2.0 over the coming month or so, I can ping you to let you know when that is ready for beta-testing if you'd like.

kpeatt avatar Aug 05 '14 16:08 kpeatt

@kpeatt That'd be great! I've given this a whirl on Chrome for Android on my LG G2 and it seems to be working correctly with that check removed. Consider me happy!

0Neji avatar Aug 06 '14 08:08 0Neji

Awesome, thanks @0Neji!

kpeatt avatar Aug 06 '14 17:08 kpeatt

hey @0Neji, not sure if you'd be interested, but feel free to PR this fix back into the main branch. Would love for others to have this issue fixed.

kpeatt avatar Aug 07 '14 00:08 kpeatt