You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Back button dosnt go back to index if the last page wast index. aka you clicked on git banner to get latest bin.
To Reproduce Bug
Click the git banner. then use back gesture on android. then use the back botton. It now takes you back to the git page as it tracks the last page and dosnt actually go to index page.
Expected Behavior
back goes back to last entry in the main page.
Anything else?
Here is a fully working solution for reference:
functiongoBackToMainPage(){letstepsBack=0;constmainPages=['/#Colors','/#Effects','/#Segments','/#Presets'];functionisMainPage(){constcurrentPage=window.location.href;returnmainPages.some(page=>currentPage.includes(page));}functionnavigateBack(){if(stepsBack<60){// Prevent infinite loopstepsBack++;window.history.back();setTimeout(()=>{if(!isMainPage()){navigateBack();}},100);// Wait for navigation to take effect}else{// Fallback if no "main" page is foundwindow.location='/';}}if(!isMainPage()){navigateBack();}else{// If already on a main pageconsole.log("You're already on a main page!");}}
that code (or a similar fix) should also be used for the settings back button preferably. as it goes back to the actuall last index page and not just to colors no matter what.
Want me to put that . function in common.js?
As it can be used for proper back functionality for settings page too and others?
Or just a simplified version that just goes back to colors for uniformity and only keep that proper back function in update.htm? Seen as im not sure you can mess up on any other page and all. Actually. Im sure there are other scenarios it also has the potential to break. Anyways. Not sure what the philosophy is here so you tell me.
keep in mind that flash memory is at a premium, keep the code as compact as possible even if it means cutting corners, IMHO this is solving an inconvenience which currently minimal code should be spent on.
The behaviour is correct and expected one. When you click/tap Github link, a new tab/window is opened. It has no history and so cannot go back while the Update page correctly returns to previous window.
The behaviour is correct and expected one. When you click/tap Github link, a new tab/window is opened. It has no history and so cannot go back while the Update page correctly returns to previous window.
Well this isnt going to be fixed with an app update.
Its wled not working well. And besides. Its broken in ap mode too. And the current way of handling is less performant too. I can create a pr to fix it all universally in wled but im guessing its no point as you see this behavior as intended?
Activity
Jacobnordvall commentedon Dec 22, 2024
that code (or a similar fix) should also be used for the settings back button preferably. as it goes back to the actuall last index page and not just to colors no matter what.
blazoncek commentedon Dec 23, 2024
Make a PR, please.
Jacobnordvall commentedon Dec 24, 2024
Want me to put that . function in common.js?
As it can be used for proper back functionality for settings page too and others?
Or just a simplified version that just goes back to colors for uniformity and only keep that proper back function in update.htm? Seen as im not sure you can mess up on any other page and all. Actually. Im sure there are other scenarios it also has the potential to break. Anyways. Not sure what the philosophy is here so you tell me.
DedeHai commentedon Dec 24, 2024
keep in mind that flash memory is at a premium, keep the code as compact as possible even if it means cutting corners, IMHO this is solving an inconvenience which currently minimal code should be spent on.
blazoncek commentedon Dec 24, 2024
Also verify functionality behind reverse proxy.
Jacobnordvall commentedon Dec 26, 2024
im not entirely sure what that means tbh.
its a line swap fix. if its just to adress the bug.
Pull request
blazoncek commentedon Dec 27, 2024
The behaviour is correct and expected one. When you click/tap Github link, a new tab/window is opened. It has no history and so cannot go back while the Update page correctly returns to previous window.
Jacobnordvall commentedon Dec 27, 2024
Its not. Its broken in the wled app.
blazoncek commentedon Dec 28, 2024
Then open an issue in WLED app.
I am truly sorry for you but WLED behaves correctly and as designed.
Jacobnordvall commentedon Dec 29, 2024
Well this isnt going to be fixed with an app update.
Its wled not working well. And besides. Its broken in ap mode too. And the current way of handling is less performant too. I can create a pr to fix it all universally in wled but im guessing its no point as you see this behavior as intended?