Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-2194

Trinidad PPR blocking does not work with 2 clicks that post

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • 2.0.0-core
    • Infrastructure
    • None

    Description

      n IE the blocking is initiated on the very first click that happens after a ppr request is sent to server. This is done via "onclick" attachEvent handler(_pprConsumeFirstClick) on the document. The problem is that attachEvent is invoked only in the bubble phase. In IE7/IE8 there is no way to set up an event handler at the capture phase. In this case the AJAX requests are initiated by the "onclick" event handler on the link. Since the click event listener is at target phase, it is always invoked first. So here is what happens when the user clicks on the Next link 2 times:

      1) AJAX Request initiated on "onclick" handler
      2) Set up the "onclick" attachEvent on the document (_pprConsumeFirstClick)
      3) User clicks on link again
      4) Since there is already an "onclick" handler, another AJAX request is queued.
      5) the _pprConsumeFirstClick "onclick" document handler kicks in, which setups event capture. It is now too late.

      We believe because of TRINIDAD-952 we do not need to start blocking after the second click. We can start immediately since we are letting the first event pass through because of a timeout:

      if (_agent.isIE)

      { // see TRINIDAD-952 - IE does not update the activeElement in time before // blocking starts. Use a timeout to allow the update. win._pprTimeoutFunc = win.setTimeout("_doPprStartBlocking(window);", 1); return; }

      The second part of the fix is to restore the scroll location after we set focus on the blocking div.

      Attachments

        1. escalatedCustPPRBlocking1.2.12.6.2.patch
          3 kB
          Venkata Guddanti
        2. escalatedCustPPRBlocking.patch
          3 kB
          Venkata Guddanti
        3. escalatedCustPPRBlocking1.2.12.3.patch
          3 kB
          Venkata Guddanti
        4. deptNavyEscalated.patch
          0.8 kB
          Venkata Guddanti
        5. deptNavyEscalated1.2.12.3.patch
          2 kB
          Venkata Guddanti

        Activity

          People

            btsulliv Blake Sullivan
            venkata.guddanti Venkata Guddanti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 8h
                8h
                Remaining:
                Remaining Estimate - 8h
                8h
                Logged:
                Time Spent - Not Specified
                Not Specified