adopted-ember-addons / adopted-ember-addons/ember-burger-menu

3D Transforms Break scrollTop and position: fixed

未关闭
#86 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
274
派生
44
PR 合并指标
30 天内没有已合并 PR

描述

I stumbled across a really weird problem - when using e-b-m, I can't get scrollTop for my app - it always returns 0!!

I don't know how that's related to e-b-m, but I do know that when I tried to remove the "height:100%" I was using on my html/body elements, I could get scrollTop - but then my navbar ("position: fixed" - bootstrap) was suddenly not "fixed!"

(NOTE: I tried EVERYTHING to get scrollTop - document, html, body, even a container - nothing worked. NOTHING. All returned 0.)

This SO [https://stackoverflow.com/questions/14732403/position-fixed-not-working-for-header] indicates that 3D transforms were the problem. So, I implemented a custom animation for e-b-m that returned nothing for everything. The visuals indicated it worked - no transforms happened, but still, position: fixed was broken. I also tried resetting "transform: initial !important" on every element in the chain from the navbar up to html, but that didn't work either.

So, bottom line, the only way to get scrollTop and position: fixed BOTH working - remove e-b-m from my project. Which breaks my heart, because I love e-b-m!! Any ideas, anyone? How to "have it all"? position: fixed and a working $(window).scrollTop() value?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。