ain / smartbanner.js

Customisable smart app banners for iOS and Android
https://npmjs.com/package/smartbanner.js
GNU General Public License v3.0
611 stars 178 forks source link

How to deal with a top-fixed nabvbar #140

Open shaharsol opened 4 years ago

shaharsol commented 4 years ago

Steps to reproduce:

  1. add a position:fixed;top:0;z-index:1000 navigation bar to the page layout (very popular with mobile design)

What happens: the smartbanner hides below the navbar instead of pushing it down

What should happen: the smaetbanner should push the navbar down

ain commented 4 years ago

Thanks for the report!

I'd imagine we need to refactor the current jQuery Mobile oriented behaviour for anything that behaves similarly. So instead of worrying about framework we'd be running, we'd actually check for the individual case.

Your PR for this improvement is welcome!

saranshkataria commented 4 years ago

I used a temporary fix in CSS:

.smartbanner {
  top: -84px;
}
Huppys commented 4 years ago

Thanks for the report!

I'd imagine we need to refactor the current jQuery Mobile oriented behaviour for anything that behaves similarly. So instead of worrying about framework we'd be running, we'd actually check for the individual case.

Your PR for this improvement is welcome!

@ain: I thought to give it a shot for a PR, so would you like to review?

ain commented 4 years ago

Brilliant, thanks a lot @Huppys for the great PR! I've just reviewed it as well, please check once you have time.

bminner commented 3 years ago

@ain Is there a reason that this is not merge into the master branch?

ain commented 3 years ago

@bminner it introduces breaking changes which is why it is designated for v2.0.0 release (the milestone attached).

kernokus commented 1 year ago

When is the 2.0.0 release planned ? I also wanted to ask - how to solve this problem with the side navigation panels that also have position:fixed and top: 54px, for example? What ways do you see to solve this problem?