ICEfaces
  1. ICEfaces
  2. ICE-8577

focus is lost on the form on the first update

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 3.1, EE-3.0.0.GA_P01, 3.2.BETA1
    • Fix Version/s: 3.3
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P2
    • Workaround Description:
      Hide
      As a workaround the web application can be configured to use an index JSP page that redirects the browser to the JSF page (where this issue occurs). During the redirect the browser will acquire the session tracking cookie. The request for the JSF page will then have this cookie thus prompting the server to generate URLs in the markup without the jsessionid parameter. Because URL format does not change anymore between requests the server will not generate large updates which cause the focus lost problem.
      Show
      As a workaround the web application can be configured to use an index JSP page that redirects the browser to the JSF page (where this issue occurs). During the redirect the browser will acquire the session tracking cookie. The request for the JSF page will then have this cookie thus prompting the server to generate URLs in the markup without the jsessionid parameter. Because URL format does not change anymore between requests the server will not generate large updates which cause the focus lost problem.

      Description


      On the first update of an input element (through singleSubmit or f:ajax) the focus is lost. Setting the tabindex doesn't have any impact on this. Once this first update is made the focus and tabing works without any issues.

      A few things I noticed:
       - This can only be seen when first loading the app in a fresh browser instance. If the tab is closed and then the page is accessed again in a new tab, this isn't an issue. To re-test this the browser needs to be closed and then re-opened between tests.
       - Once the page is displayed initially, if I refresh the page without doing an update, this issue isn't seen.

        Issue Links

          Activity

          Migration created issue -
          Hide
          Arran Mccullough added a comment - - edited

          Attached test case that shows this issue.

          Steps:

          • In a new browser instance open welcomeICEfaces.jsf
          • Focus into the first input field, enter in some text.
          • Hit the Tab key, focus is lost when it should be on the next input field.
          Show
          Arran Mccullough added a comment - - edited Attached test case that shows this issue. Steps: In a new browser instance open welcomeICEfaces.jsf Focus into the first input field, enter in some text. Hit the Tab key, focus is lost when it should be on the next input field.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #31558 Wed Oct 17 16:58:58 MDT 2012 mircea.toma ICE-8577 Use document.activeElement property to check if the focus really needs to be applied to an element. When the focus is already on the element that needs to receive focus ice.applyFocus function call will just ignore the request.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/focus.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #31559 Wed Oct 17 17:15:30 MDT 2012 mircea.toma ICE-8577 Use document.activeElement property to check if the focus really needs to be applied to an element. When the focus is already on the element that needs to receive focus ice.applyFocus function call will just ignore the request.
          Files Changed
          Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/core/src/main/javascript/focus.js
          Hide
          Mircea Toma added a comment - - edited

          There's a larger update generated because the URLs contained by the forms have appended the jsessionid path parameter during first page load but they are missing when the first update is generated.

          Show
          Mircea Toma added a comment - - edited There's a larger update generated because the URLs contained by the forms have appended the jsessionid path parameter during first page load but they are missing when the first update is generated.
          Hide
          Mircea Toma added a comment - - edited

          Use document.activeElement property (supported now by ie7, ie8, ie9, safari, opera and firefox) to check if the focus really needs to be applied to an element. When the focus is already on the element that needs to receive focus ice.applyFocus function call will just ignore the request.

          Show
          Mircea Toma added a comment - - edited Use document.activeElement property (supported now by ie7, ie8, ie9, safari, opera and firefox) to check if the focus really needs to be applied to an element. When the focus is already on the element that needs to receive focus ice.applyFocus function call will just ignore the request.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #31653 Mon Oct 22 15:03:12 MDT 2012 ken.fyten ICE-8577 Revert commit from svn rvn#1558 as it's causing a regression with ace:dateTimeEntry by setting focus on the already focussed input element.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/focus.js
          Hide
          Ken Fyten added a comment - - edited

          Reverted commit for this as it is causing the following regression behavior:
          New Regression:
          Showcase (Firefox 16/Tomcat 7):
          Manual Test Results:
          dateTimeEntry - Ajax Submit, Label Position, Indicator Text: after selecting new date in the popup calendar, the calendar closes and opens up again (not a PartialStateSavings specific issue).

          Show
          Ken Fyten added a comment - - edited Reverted commit for this as it is causing the following regression behavior: New Regression: Showcase (Firefox 16/Tomcat 7): Manual Test Results: dateTimeEntry - Ajax Submit, Label Position, Indicator Text: after selecting new date in the popup calendar, the calendar closes and opens up again (not a PartialStateSavings specific issue).
          Migration made changes -
          Field Original Value New Value
          Reporter Migration [ remote ] Arran Mccullough [ arran.mccullough ]
          Migration made changes -
          Assignee Mircea Toma [ mircea.toma ]
          Fix Version/s 3.2 [ 10338 ]
          Priority Major [ 3 ] Trivial [ 5 ]
          Assignee Priority P2 [ 10011 ]
          Migration made changes -
          Fix Version/s 3.3 [ 10370 ]
          Fix Version/s 3.2 [ 10338 ]
          Migration made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Migration made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Migration made changes -
          Fix Version/s 3.2 [ 10338 ]
          Fix Version/s 3.3 [ 10370 ]
          Migration made changes -
          Fix Version/s 3.3 [ 10370 ]
          Fix Version/s 3.2 [ 10338 ]
          Migration made changes -
          Attachment Case11612Example.war [ 14947 ]
          Ken Fyten made changes -
          Assignee Priority P2 [ 10011 ] P3 [ 10012 ]
          Ken Fyten made changes -
          Assignee Priority P3 [ 10012 ] P2 [ 10011 ]
          Mircea Toma made changes -
          Workaround Description As a workaround the web application can be configured to use an index JSP page that redirects the browser to the JSF page (where this issue occurs). During the redirect the browser will acquire the session tracking cookie. The request for the JSF page will then have this cookie thus prompting the server to generate URLs in the markup without the jsessionid parameter. Because URL format does not change anymore between requests the server will not generate large updates which cause the focus lost problem.
          Hide
          Mircea Toma added a comment - - edited

          This issue can be fixed if the attribute update generation in the DOM diff is enabled. Hopefully this approach will finally work well in the newer version of Mojarra.

          Show
          Mircea Toma added a comment - - edited This issue can be fixed if the attribute update generation in the DOM diff is enabled. Hopefully this approach will finally work well in the newer version of Mojarra.
          Hide
          Mircea Toma added a comment -

          Unfortunately updating attributes in IE doesn't always work. For example in showcase the "class" attributes on navigation links are not changed correctly.

          Show
          Mircea Toma added a comment - Unfortunately updating attributes in IE doesn't always work. For example in showcase the "class" attributes on navigation links are not changed correctly.
          Mircea Toma made changes -
          Link This issue is duplicated by ICE-8906 [ ICE-8906 ]
          Ken Fyten made changes -
          Link This issue depends on ICE-8430 [ ICE-8430 ]
          Mircea Toma made changes -
          Link This issue depends on ICE-7803 [ ICE-7803 ]
          Hide
          Mircea Toma added a comment - - edited

          ICE-8430 is now fixed. Running an application with org.icefaces.diffConfig=att should alleviate any focus related problems.

          Show
          Mircea Toma added a comment - - edited ICE-8430 is now fixed. Running an application with org.icefaces.diffConfig=att should alleviate any focus related problems.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: