I have a repeat control setup which contains a table. The table row(s) contain information from an entry in a view. When the user clicks on the entry, it will redirect them to another xPage which contains the information pertaining to the item they clicked.
I noticed that if you click the browser back button (in this case mobile iPhone Safari), it will redirect you to the previous page, but the onClick events do not fire if you click a row in the repeat control.
I'm not exactly sure what is causing this to break, but has anyone run into this in the past or have any idea no what may fix this issue?
var entry:NotesViewEntry = data;
var docId = entry.getDocument().getUniversalID();
var url = context.getUrl().getAddress().replace(view.getPageName(), '');
context.redirectToPage(url + "/xCall.xsp?documentId=" + docId + "&action=openDocument");
Edit:
The issue appears to only occur when using mobile Safari (for iPhone). It works fine in Chrome/Internet Explorer.
Another interesting detail, if you click on an item and it redirects you to a page, then you click the browser back button, you can click on the repeat control and nothing happens. However if you way 15-20 seconds and then click, it works like expected. If you click anytime before 15-20 seconds, nothing happens
Second Edit:
I ended up coming across this link: https://github.com/christophery/pushy/issues/51 which described a problem where the browser back button was creating weird behavior. I ended up using the following code which seems to have fixed the issue.
// for jQuery
$(window).bind("pageshow", function(event) {
if (event.originalEvent.persisted) {window.location.reload();}
});
// for regular JS
window.onpageshow = function(event) {
if (event.persisted) {
window.location.reload()
}
};