ICEmobile
  1. ICEmobile
  2. MOBI-673

ICEmobile-SX may not reload browser page upon return

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE 1.2
    • Fix Version/s: BridgeIt 1.0
    • Component/s: Faces
    • Labels:
      None
    • Environment:
      ICEmobile, ICEmobile-SX

      Description

      When ICEmobile-SX returns control to the browser, it is generally required for the browser page to be reloaded or updated via ajax to reflect registration or content upload.

      If the page URL already ends with #icemobilesx, this reload does not take place.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33849 Mon Mar 11 14:19:57 MDT 2013 ted.goddard clear #icemobilesx hash tag upon return from ICEmobile-SX (MOBI-673)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
        Ted Goddard created issue -
        Hide
        Ted Goddard added a comment -

        The fix max use of the history.pushState() function being investigated for back-button support. This has the advantage of removing the #icemobilesx hashtag but does not cause a page reload. The setTimeout ensures that the hashtag is cleared after any other hashchange listeners run, thereby allowing script in the page to detect the return from ICEmobile-SX and perform an ajax update if necessary.

        + setTimeout( function()

        { + var loc = window.location; + history.pushState("", document.title, loc.pathname + loc.search); + }

        , 1);

        Show
        Ted Goddard added a comment - The fix max use of the history.pushState() function being investigated for back-button support. This has the advantage of removing the #icemobilesx hashtag but does not cause a page reload. The setTimeout ensures that the hashtag is cleared after any other hashchange listeners run, thereby allowing script in the page to detect the return from ICEmobile-SX and perform an ajax update if necessary. + setTimeout( function() { + var loc = window.location; + history.pushState("", document.title, loc.pathname + loc.search); + } , 1);
        Hide
        Philip Breau added a comment -

        Need to check if window.history && history.pushState as this may not be available on some early android versions.

        http://caniuse.com/#search=history

        Show
        Philip Breau added a comment - Need to check if window.history && history.pushState as this may not be available on some early android versions. http://caniuse.com/#search=history
        Hide
        Ted Goddard added a comment -

        Good point, there's a dead spot in 3.1 - 4.0 for android support.

        If history.pushState is not supported, the best action is likely to do nothing since forcing a page reload can also cause problems (such as removing the benefit of any in-page scripts that performed an ajax update).

        Show
        Ted Goddard added a comment - Good point, there's a dead spot in 3.1 - 4.0 for android support. If history.pushState is not supported, the best action is likely to do nothing since forcing a page reload can also cause problems (such as removing the benefit of any in-page scripts that performed an ajax update).
        Steve Maryka made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Ted Goddard [ ted.goddard ]
        Steve Maryka made changes -
        Fix Version/s Bridge-it 1.0 [ 11172 ]
        Hide
        Ted Goddard added a comment -

        The #icemobilesx mechanism has been reinstated for the ICEmobile JSF integration. Additional improvements such as the callback API are not covered here. This JIRA can be closed once the JSP/Spring integration is restored.

        Show
        Ted Goddard added a comment - The #icemobilesx mechanism has been reinstated for the ICEmobile JSF integration. Additional improvements such as the callback API are not covered here. This JIRA can be closed once the JSP/Spring integration is restored.
        Hide
        Ted Goddard added a comment -

        Verified fixed.

        Show
        Ted Goddard added a comment - Verified fixed.
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: