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

        Cruz Miraback created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Security Private [ 10001 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Assignee Priority P1 [ 10010 ]
        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 .
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38563 Tue Oct 08 16:01:33 MDT 2013 mircea.toma ICE-9639 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).
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/selectmenu/selectmenu.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/combobox/combobox.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/selectmenu/SelectMenuRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/datetimeentry/datetimeentry.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/simpleselectonemenu/SimpleSelectOneMenuRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/util/PassThruAttributeWriter.java
        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.
        Cruz Miraback made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38581 Thu Oct 10 16:39:09 MDT 2013 mircea.toma ICE-9639 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.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/JavaScriptRunnerSetup.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/util/FocusController.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/component/FocusManager.java
        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.
        Cruz Miraback made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38598 Mon Oct 14 11:00:21 MDT 2013 mircea.toma ICE-9639 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.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/component/FocusManager.java
        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.
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Mircea Toma made changes -
        Fix Version/s EE-3.3.0.GA_P02 [ 11371 ]
        Mircea Toma made changes -
        Affects Version/s EE-3.3.0.GA_P01 [ 11174 ]
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Ken Fyten made changes -
        Affects Version/s 4.0 [ 10770 ]
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Judy Guglielmin made changes -
        Salesforce Case Reference 5007000000ZC1GcAAL
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        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: