Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
Form template loses focus
If anyone is interested, I was able to resolve this issue by adding an extra blank document between the two screens that have a form template. So, when second screen was added, I added the blank document. Blank documents listens to an `appear` event for when navigating back to it from the second screen. And when that happens, it gets removed from the stack and navigation goes back to first screen with form template. Here is an example of the code:- At this point, first screen with form template is already shown and user hits the button to go to the password screenCode:await viewUtils.pushPage(VIEWS.LoginPassword, this); this.blankScreenLoaded = true; // following lines allow the username screen form to regain focus // when navigating back from the password screen const blank = await viewUtils.insertPageBeforeDocument(VIEWS.LoginBlank, this); // this function parses xml, inserts document and returns it blank.addEventListener('appear', () => { if (this.blankScreenLoaded === true) { this.blankScreenLoaded = false; presenter.removeDocument(VIEWS.LoginBlank); } });LoginBlankScreen.xml<?xml version="1.0" encoding="UTF-8" ?><document><divTemplate></divTemplate></document>Hope it helps!