Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop auto scroll in Mobile view while clicking on menu bar. #6

Open
ajinzrathod opened this issue Jun 30, 2021 · 2 comments
Open

Stop auto scroll in Mobile view while clicking on menu bar. #6

ajinzrathod opened this issue Jun 30, 2021 · 2 comments

Comments

@ajinzrathod
Copy link

(In mobile)

When I am at end of page and I click menu bar ( 3 horizontal bars at top left), the content scrolls up automatically.

How can I stop this behaviour?

@eav93
Copy link

eav93 commented Sep 14, 2021

add e.preventDefault(); to

sidePanelToggler.addEventListener('click', (e) => {
        e.preventDefault();
	if (sidePanel.classList.contains('sidepanel-visible')) {
		console.log('visible');
		sidePanel.classList.remove('sidepanel-visible');
		sidePanel.classList.add('sidepanel-hidden');
		
	} else {
		console.log('hidden');
		sidePanel.classList.remove('sidepanel-hidden');
		sidePanel.classList.add('sidepanel-visible');
	}
});

@ajinzrathod
Copy link
Author

Not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants