question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Panel problem when click back button on device

See original GitHub issue

This is a (multiple allowed):

  • bug
  • enhancement
  • feature-discussion (RFC)

I have a problem with panel. When i open panel, and click back button on device, panel not closed and page was back to previous page. How to make it just close panel without go to back page. I was tried with check the body’class in pageBack events, if the body have class .with-panel-left-cover, close the panel and it’s work. But my problem, the page also turn back to previous page.

Help me please…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
Deep18commented, Feb 21, 2017

@atukilham This is how i did it. First of all add an id to the left panel div like this <div id="left_panel" class="panel panel-left panel-cover sidebar"> add an eventlisterner on back button and check for the active class with hasClass function on the listerner.

document.addEventListener("backbutton", onBackKeyDown, false); 

function onBackKeyDown() { 
	
	 if ($$('#left_panel').hasClass( "active" )) 
		{ myApp.closePanel(); 
			return false; 
			} 
			
	else { 
		mainView.router.back();
		} 
		
	return true; 
}
0reactions
lock[bot]commented, Jun 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Back Button Not Working on iPhone and Android
Restart the Device · Check for a System Update · Wiping the System Cache Partition · Use a Third-party Back Button App ·...
Read more >
Back button not working on Android? Try these 5 fixes!
If the back button is missing or not working on Android, check Navigation settings, wipe cache partition, or perform a factory reset.
Read more >
Panel problem when click back button on device #1264 - GitHub
When i open panel, and click back button on device, panel not closed and page was back to previous page. How to make...
Read more >
How to Fix Home Button/Back Button is not Working on Android?
How to Fix Home Button/ Back Button is not Working on Android ?Step 1: Open "Play Store" App.Step 2: Do a search for...
Read more >
How to fix Back Button/Home Button Not Working on Android ...
Restart your Device. · Use a third-party menu button App. · Wipe Cache Partition. · Reset phone.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found