ICEmobile
  1. ICEmobile
  2. MOBI-197

inline JavaScript included once for each dependent component type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 Final
    • Fix Version/s: EE 1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEmobile

      Description

      Inline JavaScript must be written once if any dependent components are on the page.

        Activity

        Hide
        Ted Goddard added a comment -

        If the presence of the component is not detected correctly, the inline JavaScript may be written more than once or not written at all. In the case of mobileshowcase, the following sequence causes the inline script for the button to not be written:

        1. Load menu page (GET)
        2. Select Buttons demo (AJAX)
        3. Press Menu button (AJAX)
        4. Change theme (POST)
        5. Select Buttons demo (AJAX)

        Buttons will not work at this point. The problem is that 2. marked the button JavaScript as rendered in the ViewMap, but 4. preserved the ViewMap while clearing the JavaScript memory in the browser. The current state-machine implementation did not take full-page POST into account, only GET and AJAX requests.

        Show
        Ted Goddard added a comment - If the presence of the component is not detected correctly, the inline JavaScript may be written more than once or not written at all. In the case of mobileshowcase, the following sequence causes the inline script for the button to not be written: 1. Load menu page (GET) 2. Select Buttons demo (AJAX) 3. Press Menu button (AJAX) 4. Change theme (POST) 5. Select Buttons demo (AJAX) Buttons will not work at this point. The problem is that 2. marked the button JavaScript as rendered in the ViewMap, but 4. preserved the ViewMap while clearing the JavaScript memory in the browser. The current state-machine implementation did not take full-page POST into account, only GET and AJAX requests.
        Hide
        Ted Goddard added a comment -

        The fix makes use of a map of marker values kept in the viewMap, cleared upon every non-Ajax page render.

        Show
        Ted Goddard added a comment - The fix makes use of a map of marker values kept in the viewMap, cleared upon every non-Ajax page render.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: