ICEmobile
  1. ICEmobile
  2. MOBI-494

Camera does not work with ICEmobile-SX in mvc-mediacast

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1 Final
    • Fix Version/s: 1.2 Beta
    • Component/s: Spring
    • Labels:
      None
    • Environment:
      ICEmobile, JSP

      Description


      Although correctly registered with ICEmobile-SX, the camera button only causes the page to reload and does not launch ICEmobile-SX.

        Activity

        Hide
        Ted Goddard added a comment - - edited

        The root cause is not clear, but the problem was traced to the following code:
        var returnURL = window.location;
        if ("" == returnURL.hash) {
        returnURL.hash = "icemobilesx";
        It appears that window.location is being used by reference rather than value, so operating on the hash code causes a subsequent window.location change to fail. The solution is to revert to an earlier implementation that was more verbose but functional:
        var returnURL = "" + window.location;
        if ("" == window.location.hash) {
        var lastHash = returnURL.lastIndexOf("#");
        if (lastHash > 0)

        { returnURL = returnURL.substring(0, lastHash); }

        returnURL += "#icemobilesx";

        Show
        Ted Goddard added a comment - - edited The root cause is not clear, but the problem was traced to the following code: var returnURL = window.location; if ("" == returnURL.hash) { returnURL.hash = "icemobilesx"; It appears that window.location is being used by reference rather than value, so operating on the hash code causes a subsequent window.location change to fail. The solution is to revert to an earlier implementation that was more verbose but functional: var returnURL = "" + window.location; if ("" == window.location.hash) { var lastHash = returnURL.lastIndexOf("#"); if (lastHash > 0) { returnURL = returnURL.substring(0, lastHash); } returnURL += "#icemobilesx";
        Hide
        Ted Goddard added a comment - - edited

        Assignee: Ted Goddard (was: Steve Maryka)
        Resolution: Fixed

        Show
        Ted Goddard added a comment - - edited Assignee: Ted Goddard (was: Steve Maryka) Resolution: Fixed

          People

          • Assignee:
            Steve Maryka
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: