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

        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'.
        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.
        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
        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.
        Hide
        Mircea Toma added a comment -

        Applied fix to maintenance branch.

        Show
        Mircea Toma added a comment - Applied fix to maintenance branch.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: