ICEfaces
  1. ICEfaces
  2. ICE-9639

Regression: JS Errors When Removing Focus From Certain Components

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P01
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces3 trunk revision 38556
      All browsers
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      There are JS errors occuring when tabbing away (blur) from certain components. I've noticed it with: textEntry, textAreaEntry, autoCompleteEntry, selectMenu, comboBox, and checkboxButton. This is also preventing the ajax events and listeners from firing for textEntry and textAreaEntry.

      In Firefox:
      ReferenceError: setFocus is not defined
      http://localhost:8080/focusManager/javax.faces.resource/util/ace-components.uncompressed.js.jsf?ln=icefaces.ace&v=3_4_0_131008
      Line 2929

      In IE:
      Message: 'setFocus' is undefined
      Line: 2929
      Char: 9
      Code: 0
      URI: http://localhost:8080/focusManager/javax.faces.resource/util/ace-components.uncompressed.js.jsf?ln=icefaces.ace&v=3_4_0_131008

        Activity

        Hide
        Mircea Toma added a comment -

        Modified ACE components that are referencing setFocus function in their JS code to be using now ice.setFocus (which is part of the public bridge API). When compat resources are not loaded setFocus function is not defined. The compat resources are now loaded only when needed, see ICE-9622.

        Show
        Mircea Toma added a comment - Modified ACE components that are referencing setFocus function in their JS code to be using now ice.setFocus (which is part of the public bridge API). When compat resources are not loaded setFocus function is not defined. The compat resources are now loaded only when needed, see ICE-9622 .
        Hide
        Cruz Miraback added a comment -

        The changes for this caused a regression in icecore:focusManager (revision# 38563). When using this config, after the page has loaded the focus can not be changed from where it is placed initially. When trying to move focus, either by clicking or tabbing away from the field, the focus immediately moves back.

        Show
        Cruz Miraback added a comment - The changes for this caused a regression in icecore:focusManager (revision# 38563). When using this config, after the page has loaded the focus can not be changed from where it is placed initially. When trying to move focus, either by clicking or tabbing away from the field, the focus immediately moves back.
        Hide
        Mircea Toma added a comment -

        How can I reproduce this new regression?

        Show
        Mircea Toma added a comment - How can I reproduce this new regression?
        Hide
        Cruz Miraback added a comment -

        I just placed a test app at 'iceads1/Public/QA/JIRAs/ICE-9639.war'. Upon further testing it seems to only be an issue when an ACE component (ace:textEntry in this case) is first in the form.

        Show
        Cruz Miraback added a comment - I just placed a test app at 'iceads1/Public/QA/JIRAs/ ICE-9639 .war'. Upon further testing it seems to only be an issue when an ACE component (ace:textEntry in this case) is first in the form.
        Hide
        Mircea Toma added a comment -

        Modified FocusManager to set focus on the first entry only when ice.focus parameter is missing or it's equal to ''. This helps avoiding any interference with the focus retention feature. FocusManager is now also applying the focus through the FocusController (used for focus retention) to avoid sending multiple focus commands to the browser.

        Show
        Mircea Toma added a comment - Modified FocusManager to set focus on the first entry only when ice.focus parameter is missing or it's equal to ''. This helps avoiding any interference with the focus retention feature. FocusManager is now also applying the focus through the FocusController (used for focus retention) to avoid sending multiple focus commands to the browser.
        Hide
        Cruz Miraback added a comment -

        I'm still getting the focus issue as described, testing on trunk revision# 38584 in Firefox24, Chrome30, and IE10 using the test app at 'iceads1/Public/QA/JIRAs/ICE-9639.war'. I'm unable to move focus away from the first component in the form.

        Show
        Cruz Miraback added a comment - I'm still getting the focus issue as described, testing on trunk revision# 38584 in Firefox24, Chrome30, and IE10 using the test app at 'iceads1/Public/QA/JIRAs/ ICE-9639 .war'. I'm unable to move focus away from the first component in the form.
        Hide
        Mircea Toma added a comment -

        Applying focus to the first or the specified component only when 'ice.focus' parameter is missing, thus making sure to not interfere at all with the focus retention feature.

        Show
        Mircea Toma added a comment - Applying focus to the first or the specified component only when 'ice.focus' parameter is missing, thus making sure to not interfere at all with the focus retention feature.
        Hide
        Mircea Toma added a comment -

        Apply setFocus patch to the maintenance branch.

        Show
        Mircea Toma added a comment - Apply setFocus patch to the maintenance branch.
        Hide
        Mircea Toma added a comment -

        Replaced setFocus() function usages with ice.setFocus(). setFocus() function is defined only when any of the compat components are loaded.

        Show
        Mircea Toma added a comment - Replaced setFocus() function usages with ice.setFocus(). setFocus() function is defined only when any of the compat components are loaded.
        Hide
        Liana Munroe added a comment -

        Issue no longer seen on icefaces-ee-3.3.0.GA-maintenance revision #39255.

        Show
        Liana Munroe added a comment - Issue no longer seen on icefaces-ee-3.3.0.GA-maintenance revision #39255.
        Hide
        Kyle Stiemann added a comment -

        A workaround for this issue (as noted in ICE-8444) is to include the icefaces-compat.jar as a dependency.

        Show
        Kyle Stiemann added a comment - A workaround for this issue (as noted in ICE-8444 ) is to include the icefaces-compat.jar as a dependency.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Cruz Miraback
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: