ICEfaces
  1. ICEfaces
  2. ICE-10260

ace:dialog - Add new "none" value for "setFocus" attribute

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02, 4.0
    • Fix Version/s: 4.0, EE-3.3.0.GA_P03
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      By default, the ace:dialog JS component will set initial focus to the first focussable element on the dialog when it is shown.

      However, in some cases applications may not want to have the focus moved to the ace:dialog when it is shown. To facilitate this, we should add a new "none" value to the "setFocus" attribute on ace:dialog. When "setFocus='none'", the ace:dialog will not claim focus at all, leaving it to whatever element had it on the main page prior to the dialog being displayed.

        Activity

        Arran Mccullough created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Summary ace:dialog - Setting focusManaged=false should also disable the dialog focus management ace:dialog - Add new "none" value for "setFocus" attribute
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s 4.0 [ 11382 ]
        Fix Version/s EE-3.3.0.GA_P03 [ 11572 ]
        Description When setting the following parameter:

        <context-param>
        <param-name>org.icefaces.focusManaged</param-name>
        <param-value>false</param-value>
        </context-param>

        This should also disable the focus management used for the ace:dialog to automatically set focus to the first input field.
        By default, the ace:dialog JS component will set initial focus to the first focussable element on the dialog when it is shown.

        However, in some cases applications may not want to have the focus moved to the ace:dialog when it is shown. To facilitate this, we should add a new "none" value to the "seFocus" attribute on ace:dialog. When "setFocus='none'", the ace:dialog will not claim focus at all, leaving it to whatever element had it on the main page prior to the dialog being displayed.
        Affects Documentation (User Guide, Ref. Guide, etc.) [ 10003 ]
        Assignee Priority P2 [ 10011 ]
        Ken Fyten made changes -
        Description By default, the ace:dialog JS component will set initial focus to the first focussable element on the dialog when it is shown.

        However, in some cases applications may not want to have the focus moved to the ace:dialog when it is shown. To facilitate this, we should add a new "none" value to the "seFocus" attribute on ace:dialog. When "setFocus='none'", the ace:dialog will not claim focus at all, leaving it to whatever element had it on the main page prior to the dialog being displayed.
        By default, the ace:dialog JS component will set initial focus to the first focussable element on the dialog when it is shown.

        However, in some cases applications may not want to have the focus moved to the ace:dialog when it is shown. To facilitate this, we should add a new "none" value to the "setFocus" attribute on ace:dialog. When "setFocus='none'", the ace:dialog will not claim focus at all, leaving it to whatever element had it on the main page prior to the dialog being displayed.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #42661 Mon Sep 29 18:12:35 MDT 2014 mircea.toma ICE-10260 Modified ace:dialog to avoid applying any focus when 'setFocus' attribute is set to 'none'.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/jquery/ui/jquery-ui.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/dialog/dialog.js
        Hide
        Mircea Toma added a comment -

        Modified ace:dialog to avoid applying any focus when 'setFocus' attribute is set to 'none'.

        Show
        Mircea Toma added a comment - Modified ace:dialog to avoid applying any focus when 'setFocus' attribute is set to 'none'.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Carmen Cristurean added a comment -

        The ace:dialog QA test app was updated with regression testing for setFocus="none".

        Testing results (r. 42661/ IE10, IE11, FF31, Chrome37):
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/dialog

        /dialogSetFocus.jsf - fails in IE10/IE11: when selecting for="none" from the drop-down, the ace:dialog opens up with the first component - ace:textEntry - being focused.
        Not an issue in FF31 and Chrome37.

        /dialogSetFocus1.jsf
        Opening dialog via h:commandButton type=submit with actionListener - always passes.
        Opening dialog via h:commandButton type=button - fails until the dialog is opened with the h:commandButton type=submit with actionListener. Afterwards, it passes.

        /dialogFocusPrecedence.jsf (testing together setFocus attribute and icecore:focusManager)
        The setFocus attribute takes precedence over the icecore:focusManager as long as its value is not "none".
        When setFocus=none the icecore:focusManager selection defines the component that will be focused. Please confirm this is the correct behavior.

        Also, the TLD doc has not been updated yet to reflect this change.

        Show
        Carmen Cristurean added a comment - The ace:dialog QA test app was updated with regression testing for setFocus="none". Testing results (r. 42661/ IE10, IE11, FF31, Chrome37): http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/dialog /dialogSetFocus.jsf - fails in IE10/IE11: when selecting for="none" from the drop-down, the ace:dialog opens up with the first component - ace:textEntry - being focused. Not an issue in FF31 and Chrome37. /dialogSetFocus1.jsf Opening dialog via h:commandButton type=submit with actionListener - always passes. Opening dialog via h:commandButton type=button - fails until the dialog is opened with the h:commandButton type=submit with actionListener. Afterwards, it passes. /dialogFocusPrecedence.jsf (testing together setFocus attribute and icecore:focusManager) The setFocus attribute takes precedence over the icecore:focusManager as long as its value is not "none". When setFocus=none the icecore:focusManager selection defines the component that will be focused. Please confirm this is the correct behavior. Also, the TLD doc has not been updated yet to reflect this change.
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Applied fix in the dialog test app by initializing the value modified by the drop downs to 'none'. The 'none' value looks like is selected because it is the first value in the list but really in the backing bean the value used to be initialised to the empty string.

        As for the focus precedence the current behaviour is correct, see:
        http://jira.icesoft.org/browse/ICE-9962?focusedCommentId=52647&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-52647

        Show
        Mircea Toma added a comment - Applied fix in the dialog test app by initializing the value modified by the drop downs to 'none'. The 'none' value looks like is selected because it is the first value in the list but really in the backing bean the value used to be initialised to the empty string. As for the focus precedence the current behaviour is correct, see: http://jira.icesoft.org/browse/ICE-9962?focusedCommentId=52647&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-52647
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Carmen Cristurean added a comment -

        Verified on r. 42681 in IE10, Chrome37, FF31.

        Show
        Carmen Cristurean added a comment - Verified on r. 42681 in IE10, Chrome37, FF31.
        Hide
        Ken Fyten added a comment -

        Re-opened to backport to the 3.3 maintenance branch.

        Show
        Ken Fyten added a comment - Re-opened to backport to the 3.3 maintenance branch.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Applied fix to maintenance branch.

        Show
        Mircea Toma added a comment - Applied fix to maintenance branch.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: