vue-burger-menu icon indicating copy to clipboard operation
vue-burger-menu copied to clipboard

Burger icon sticks around when the user scrolls down, not sure how to turn this off.

Open Texlo-Dev opened this issue 6 years ago • 11 comments

Currently the burger icon behaves in a way that if a user scrolls down a page, the icon stays in the left or right corner always. How can I turn off this behavior, and have it disappear when the user scrolls down?

Texlo-Dev avatar Sep 10 '18 18:09 Texlo-Dev

Currently there is no scroll event or such behaviour/feature is there, but you can use a seperate navbar and place this burger-menu on navbar and then use CSS method (overflow)

Well i would be happy to have a PR to fix this behaviour

mbj36 avatar Sep 10 '18 19:09 mbj36

May I ask what the overflow method is? I have the burger on a separate navbar.

Texlo-Dev avatar Sep 11 '18 00:09 Texlo-Dev

@shivamluthra @Sshruti10 Can you guys think of how can we fix this ?

mbj36 avatar Oct 01 '18 08:10 mbj36

CSS static position property can be used.

Sshruti10 avatar Oct 01 '18 09:10 Sshruti10

Not sure how it will fix, can you try on your machine and see if it works

mbj36 avatar Oct 01 '18 09:10 mbj36

@RTK99 Hi, I am unable to get that how will user experience improve by doing this. Because, everytime user scrolls down a huge page, he has to reach back to the top of page in order to access the burger menu. For personal use if you want to use it like this, you would have to mention the window height after scrolling upto which, you can set the display property of your burger menu to hidden and turn it back to block for vice-versa.

shivamluthra avatar Oct 01 '18 18:10 shivamluthra

I recommend making this optional. It may be fine on bigger screen, but on mobile, it really does obscure content on the screen.

On Mon, Oct 1, 2018, 2:15 PM Shivam Luthra [email protected] wrote:

@RTK99 https://github.com/RTK99 Hi, I am unable to get that how will user experience improve by doing this. Because, everytime user scrolls down a huge page, he has to reach back to the top of page in order to access the burger menu. For personal use if you want to use it like this, you would have to mention the window height after scrolling upto which, you can make the display property of your burger menu to hidden and turn it back to block for vice-versa.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mbj36/vue-burger-menu/issues/5#issuecomment-426008869, or mute the thread https://github.com/notifications/unsubscribe-auth/AOjIfm-yvnbXdPo-bjRzkL2X0eXuVoumks5uglvDgaJpZM4Wh7QV .

Texlo-Dev avatar Oct 01 '18 21:10 Texlo-Dev

@RTK99 really we should do something here. It is little ugly. For easy solution you can set position with respect to media screen size like

@media screen and (max-width: 40em) { .bm-burger-button { left: 6px; top: 6px; } } I have tried it. Now, it looks better. (https://codesandbox.io/s/n3m0zx1zwp)

Or hide it for non zero window position or unhide it for a while if currentY position decrease on onscroll event.(means scroll UP)

mritunjayz avatar Oct 25 '18 22:10 mritunjayz

@mritunjaygoutam12 Can you add this as a doc in FAQ wiki page

mbj36 avatar Oct 26 '18 12:10 mbj36

Personally, i never use the hamburger icon. I use other elements to open and close the sidebar programmatically. Then you have better control.

Pixney-William avatar Nov 23 '18 16:11 Pixney-William

@Pixney-William How do you trigger the open method programmatically?

ghost avatar Mar 07 '19 17:03 ghost