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

          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
          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
          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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: