ICEfaces
  1. ICEfaces
  2. ICE-4308

"blockUIOnSubmit=true" stops button press from firing Action event

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.3, 1.8.2-EE-GA_P02
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      blockUIOnSubmit=true

      Description

      When the app. has focus on an inputText field (for example) set to partialSubmit=true and the user then clicks on a commandButton, for example, to trigger an action event there can be cases where the onblur event is fired as focus leaves the inputText (and goes to the button) causes the UIBlocker to display for the partialSubmit associated with the onblur. In turn, the UIBlocker actually blocks the button click event from registering in the browser, resulting in the need for the user to click the button again to fire the action event.

      To reproduce using IE view the Calendar demo in Comp. Showcase, in the popup calendar edit the date in the text field, then click the popup button. The edited date will be partialSubmitted to the server, but most times the button click will be "blocked". You'll need to click the button again to view the popup calendar.

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18708 Tue Mar 31 14:36:01 MDT 2009 mircea.toma ICE-4308 Disable request locking for now.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.async.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.js
          Ken Fyten created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          ICEfaces Forum Reference http://www.icefaces.org/JForum/posts/list/12125.page#48554
          Salesforce Case []
          Affects Version/s 1.8RC2 [ 10163 ]
          Assignee Mircea Toma [ mircea.toma ]
          Ken Fyten made changes -
          Salesforce Case []
          Description When the app. has focus on an inputText field (for example) set to partialSubmit=true and the user then clicks on a commandButton, for example, to trigger an action event there can be cases where the onblur event is fired as focus leaves the inputText (and goes to the button) causes the UIBlocker to display for the partialSubmit associated with the onblur. In turn, the UIBlocker actually blocks the button click event from registering in the browser, resulting in the need for the user to click the button again to fire the action event.

          Since the UIBlocker is most useful for longer running submits (higher latency on the submit responses), a potential fix for this would be to delay the display of the hourglass/UIBlocker for a set period of millis, thus giving the button time to fire while preserving the UIBlocker behavior for longer running submits.

          Of course, this implies that it is okay for a partialSubmit to overlap with the action event submit, which might itself cause problems.
          When the app. has focus on an inputText field (for example) set to partialSubmit=true and the user then clicks on a commandButton, for example, to trigger an action event there can be cases where the onblur event is fired as focus leaves the inputText (and goes to the button) causes the UIBlocker to display for the partialSubmit associated with the onblur. In turn, the UIBlocker actually blocks the button click event from registering in the browser, resulting in the need for the user to click the button again to fire the action event.

          Since the UIBlocker is most useful for longer running submits (higher latency on the submit responses), a potential fix for this would be to delay the display of the hourglass/UIBlocker for a set period of millis, thus giving the button time to fire while preserving the UIBlocker behavior for longer running submits.

          Of course, this implies that it is okay for a partialSubmit to overlap with the action event submit, which might itself cause problems.

          To reproduce using IE view the Calendar demo in Comp. Showcase, in the popup calendar edit the date in the text field, then click the popup button. The edited date will be partialSubmitted to the server, but most times the button click will be "blocked". You'll need to click the button again to view the popup calendar.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18711 Tue Mar 31 16:18:48 MDT 2009 mircea.toma ICE-4308 Revert back to locking out subsequent submits.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.async.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18712 Tue Mar 31 16:35:50 MDT 2009 mircea.toma ICE-4308 Disable UI blocker by default.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
          Hide
          Mircea Toma added a comment -

          We decided that this issue is just an undesired but unavoidable side-effect of the UI blocker feature. The UI blocker will be disabled by default, unlike how original issue ICE-4203 states.

          Show
          Mircea Toma added a comment - We decided that this issue is just an undesired but unavoidable side-effect of the UI blocker feature. The UI blocker will be disabled by default, unlike how original issue ICE-4203 states.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.)]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Salesforce Case []
          Description When the app. has focus on an inputText field (for example) set to partialSubmit=true and the user then clicks on a commandButton, for example, to trigger an action event there can be cases where the onblur event is fired as focus leaves the inputText (and goes to the button) causes the UIBlocker to display for the partialSubmit associated with the onblur. In turn, the UIBlocker actually blocks the button click event from registering in the browser, resulting in the need for the user to click the button again to fire the action event.

          Since the UIBlocker is most useful for longer running submits (higher latency on the submit responses), a potential fix for this would be to delay the display of the hourglass/UIBlocker for a set period of millis, thus giving the button time to fire while preserving the UIBlocker behavior for longer running submits.

          Of course, this implies that it is okay for a partialSubmit to overlap with the action event submit, which might itself cause problems.

          To reproduce using IE view the Calendar demo in Comp. Showcase, in the popup calendar edit the date in the text field, then click the popup button. The edited date will be partialSubmitted to the server, but most times the button click will be "blocked". You'll need to click the button again to view the popup calendar.
          When the app. has focus on an inputText field (for example) set to partialSubmit=true and the user then clicks on a commandButton, for example, to trigger an action event there can be cases where the onblur event is fired as focus leaves the inputText (and goes to the button) causes the UIBlocker to display for the partialSubmit associated with the onblur. In turn, the UIBlocker actually blocks the button click event from registering in the browser, resulting in the need for the user to click the button again to fire the action event.

          To reproduce using IE view the Calendar demo in Comp. Showcase, in the popup calendar edit the date in the text field, then click the popup button. The edited date will be partialSubmitted to the server, but most times the button click will be "blocked". You'll need to click the button again to view the popup calendar.
          Security Private [ 10001 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 1.8 [ 10161 ]
          Hide
          Isuru Perera added a comment -

          I posted a suggestion to ICEfaces forum.

          http://www.icefaces.org/JForum/posts/list/12191.page#48623

          Show
          Isuru Perera added a comment - I posted a suggestion to ICEfaces forum. http://www.icefaces.org/JForum/posts/list/12191.page#48623
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Mircea Toma [ mircea.toma ]
          Hide
          Ken Fyten added a comment -

          Re-opening to see if any improvements can be made in the future.

          Show
          Ken Fyten added a comment - Re-opening to see if any improvements can be made in the future.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Assignee Ken Fyten [ ken.fyten ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 1.8 [ 10161 ]
          Affects Version/s 1.8 [ 10161 ]
          Affects Version/s 1.8RC2 [ 10163 ]
          Ken Fyten made changes -
          Link This issue is duplicated by ICE-2893 [ ICE-2893 ]
          Hide
          Ken Fyten added a comment -
          Show
          Ken Fyten added a comment - Additional forum suggestions: http://www.icefaces.org/JForum/posts/list/12191.page
          Ken Fyten made changes -
          Summary UI Blocker stops button press from firing Action event "blockUIOnSubmit=true" stops button press from firing Action event
          Salesforce Case []
          Hide
          Murat Hazer added a comment -

          is there any known workaround for this issue?

          Show
          Murat Hazer added a comment - is there any known workaround for this issue?
          Hide
          Abhijit Jere added a comment - - edited

          Is the fix coming anytime soon? This is badly wanted in our product. Without setting blockUIOnSubmit="true", there are all sorts of issues with setters getting called with null values on double clicking buttons.

          Setting blockUIOnSubmit="true" fixes that, however, the cure turns out to be worse than the disease in that user's first click on any buttons in that page is a no-op for him/her and is much worse than original issue from user perspective.

          Show
          Abhijit Jere added a comment - - edited Is the fix coming anytime soon? This is badly wanted in our product. Without setting blockUIOnSubmit="true", there are all sorts of issues with setters getting called with null values on double clicking buttons. Setting blockUIOnSubmit="true" fixes that, however, the cure turns out to be worse than the disease in that user's first click on any buttons in that page is a no-op for him/her and is much worse than original issue from user perspective.
          Hide
          Isuru Perera added a comment -

          I also need a fix for this very badly. As I suggested, I hope we can enable it only for a specified actions.

          I hope ICEfaces developers have a concern about this issue and please let us know whether they are working on this.

          Thanks

          Show
          Isuru Perera added a comment - I also need a fix for this very badly. As I suggested, I hope we can enable it only for a specified actions. I hope ICEfaces developers have a concern about this issue and please let us know whether they are working on this. Thanks
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 1.8.2-EE-GA_P02 [ 10226 ]
          Arran Mccullough made changes -
          Salesforce Case [5007000000C3nmz]
          Ken Fyten made changes -
          Fix Version/s 1.8.3 [ 10211 ]
          Assignee Priority P1
          Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
          Hide
          Ken Fyten added a comment -

          There are some related notes in ICE-2697 around a possible solution that could be implemented.

          Show
          Ken Fyten added a comment - There are some related notes in ICE-2697 around a possible solution that could be implemented.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21745 Wed Jun 16 08:31:43 MDT 2010 mircea.toma ICE-4308 Cancel double submit blocking for "onblur" type events.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/status.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.async.js
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/event.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/parameters.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Hide
          Mircea Toma added a comment -

          Disable double submit locking when first submit is triggered by "onblur" events. This way buttons that are clicked right after an input text loses focus will work as expected.

          Show
          Mircea Toma added a comment - Disable double submit locking when first submit is triggered by "onblur" events. This way buttons that are clicked right after an input text loses focus will work as expected.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Ken Fyten added a comment -

          The last commit causes the following new regression: ICE-5827.

          Show
          Ken Fyten added a comment - The last commit causes the following new regression: ICE-5827 .
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Ken Fyten added a comment -

          ICE-5827 is resolved.

          However, with latest code and "blockUIOnSubmit=true", clicking the "Extended Components" demo link on the left-side tree of the Facelets Enhanced Comp. Showcase fails to open the demo panel. This works fine when "blockUIOnSubmit=false", however.

          Show
          Ken Fyten added a comment - ICE-5827 is resolved. However, with latest code and "blockUIOnSubmit=true", clicking the "Extended Components" demo link on the left-side tree of the Facelets Enhanced Comp. Showcase fails to open the demo panel. This works fine when "blockUIOnSubmit=false", however.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21751 Thu Jun 17 05:45:50 MDT 2010 mircea.toma ICE-4308 Replace commandLink with outputText to avoid redundant double submit.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets-enh/web/WEB-INF/includes/content/navigation.jspx
          Hide
          Mircea Toma added a comment -

          The last issue was caused by a double submit initiated when clicking on the header of panel collapsible. navigation.jspx file has a command link in the header of the panel which triggers a submit when clicked, but lets the event to propagate to the panel collapsible header which will trigger a submit as well. When blockUIOnSubmit is enabled the second submit is blocked, unfortunately the last submit toggles the state of the panel, first submit doesn't change anything in the state of the components or application.

          The fix applied simply replaces ice:commandLink found in the header of panel collapsible with an ice:outputText.

          Show
          Mircea Toma added a comment - The last issue was caused by a double submit initiated when clicking on the header of panel collapsible. navigation.jspx file has a command link in the header of the panel which triggers a submit when clicked, but lets the event to propagate to the panel collapsible header which will trigger a submit as well. When blockUIOnSubmit is enabled the second submit is blocked, unfortunately the last submit toggles the state of the panel, first submit doesn't change anything in the state of the components or application. The fix applied simply replaces ice:commandLink found in the header of panel collapsible with an ice:outputText.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Ken Fyten added a comment -

          We should tighten up the logic of this such that a submit (partial) triggered by an onblur will cause the UIblock state to be invoked by the next submit (regardless of its origin). This will allow the use-case of an inputText with partial-submit=true having focus, and then the user clicking on a commandButton to work as expected (first partial-submit goes through, second full-submit goes through and invokes the UIBlocker, preventing further submits until after the second response is returned). In addition, it will also prevent the double-submit exposure risk of allowing a user to trigger numerous partialSubmits sequentially (avoiding the UIblock), as is possible with the current logic.

          I also noticed that we've disabled the UI blocking DIV with the last changes. I think this is problem in that without the DIV blocking subsequent user-interactions it is possible/likely that users may make additional state changes to the browser UI components (that have partialSubmit=true specified) that will never be submitted to the server, resulting in a state-delta between what the browser UI indicates and what the server thinks.

          For example, imagine a form with numerous ice:selectOneMenu components, each with partialSubmit=true. Without the UIBlocking DIV, the user could change the selected value of one or more of the components while a previously triggered partial-submit is still being processed, resulting in the component indicating selected values on the client that are never submitted to the server. With the blocking DIV present, the user will not be able to change the state of the browser-side components, avoiding this possibility. It also provides feedback to the user that they need to wait for the current submit operation to complete before proceeding with additional changes to the form, etc. The hourglass combined with the inability to interact with the page combine to inform the user that they must wait before proceeding.

          The UI blocking DIV should be invoked at the same time that the submit block is, of course.

          Show
          Ken Fyten added a comment - We should tighten up the logic of this such that a submit (partial) triggered by an onblur will cause the UIblock state to be invoked by the next submit (regardless of its origin). This will allow the use-case of an inputText with partial-submit=true having focus, and then the user clicking on a commandButton to work as expected (first partial-submit goes through, second full-submit goes through and invokes the UIBlocker, preventing further submits until after the second response is returned). In addition, it will also prevent the double-submit exposure risk of allowing a user to trigger numerous partialSubmits sequentially (avoiding the UIblock), as is possible with the current logic. I also noticed that we've disabled the UI blocking DIV with the last changes. I think this is problem in that without the DIV blocking subsequent user-interactions it is possible/likely that users may make additional state changes to the browser UI components (that have partialSubmit=true specified) that will never be submitted to the server, resulting in a state-delta between what the browser UI indicates and what the server thinks. For example, imagine a form with numerous ice:selectOneMenu components, each with partialSubmit=true. Without the UIBlocking DIV, the user could change the selected value of one or more of the components while a previously triggered partial-submit is still being processed, resulting in the component indicating selected values on the client that are never submitted to the server. With the blocking DIV present, the user will not be able to change the state of the browser-side components, avoiding this possibility. It also provides feedback to the user that they need to wait for the current submit operation to complete before proceeding with additional changes to the form, etc. The hourglass combined with the inability to interact with the page combine to inform the user that they must wait before proceeding. The UI blocking DIV should be invoked at the same time that the submit block is, of course.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21767 Mon Jun 21 07:34:26 MDT 2010 mircea.toma ICE-4308 Refactor onReceive callbacks to be registered per request thus avoiding any mixups when resposes are received out of order. Wire up UI blocker in the bridge instead of having it abstracted as indicator in the status manger code.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/callback.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.async.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/connection.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/array.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Hide
          Mircea Toma added a comment -

          Refactored onReceive callbacks to be registered per request to avoid any mixups when resposes are received out of order. Wired up UI blocker in the bridge instead of having it abstracted as indicator in the status manager code.

          Show
          Mircea Toma added a comment - Refactored onReceive callbacks to be registered per request to avoid any mixups when resposes are received out of order. Wired up UI blocker in the bridge instead of having it abstracted as indicator in the status manager code.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21780 Mon Jun 21 16:25:53 MDT 2010 mircea.toma ICE-4308 NOOPIndicator doesn't need initialization.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Ken Fyten made changes -
          Link This issue blocks ICE-2697 [ ICE-2697 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21806 Fri Jun 25 09:57:19 MDT 2010 mircea.toma ICE-4308 Block keyboard interaction by disabling the key event handlers on elements that can receive focus.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Hide
          Ken Fyten added a comment -

          Re-opened. Current code is working well for blocking mouse-based input. However, we now need a solution that prevents keyboard navigation/entry while the blocker is enabled.

          Show
          Ken Fyten added a comment - Re-opened. Current code is working well for blocking mouse-based input. However, we now need a solution that prevents keyboard navigation/entry while the blocker is enabled.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Mircea Toma added a comment -

          Blocked keyboard interaction by disabling the key event handlers (keypress,keyup,keydown) temporarily on elements that can receive focus.

          Show
          Mircea Toma added a comment - Blocked keyboard interaction by disabling the key event handlers (keypress,keyup,keydown) temporarily on elements that can receive focus.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Ken Fyten added a comment -

          The latest changes are working well. However, the keyboard event disabling feature seems to be occurring regardless of the 'blockUIOnSubmit="true"' setting. It should only be invoked when 'blockUIOnSubmit="true"'.

          Show
          Ken Fyten added a comment - The latest changes are working well. However, the keyboard event disabling feature seems to be occurring regardless of the 'blockUIOnSubmit="true"' setting. It should only be invoked when 'blockUIOnSubmit="true"'.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21814 Mon Jun 28 14:16:10 MDT 2010 mircea.toma ICE-4308 Block keyboard interaction by disabling the key event handlers on elements that can receive focus...only when com.icesoft.faces.synchronousUpdate feature is enabled.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Hide
          Mircea Toma added a comment -

          Disable keyboard blocking when com.icesoft.faces.synchronousUpdate feature is disabled.

          Show
          Mircea Toma added a comment - Disable keyboard blocking when com.icesoft.faces.synchronousUpdate feature is disabled.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Affects [Documentation (User Guide, Ref. Guide, etc.)] [Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration]
          Assignee Priority P1
          Hide
          Joanne Bai added a comment -

          Verified successfully on ICEfaces/trunk revision 21855, using Tomcat6.0.26 + FF3.6 and IE8

          Test app has been committed to repo\qa\trunk\Regression\Manual\ICE-4308

          Show
          Joanne Bai added a comment - Verified successfully on ICEfaces/trunk revision 21855, using Tomcat6.0.26 + FF3.6 and IE8 Test app has been committed to repo\qa\trunk\Regression\Manual\ ICE-4308
          Show
          Isuru Perera added a comment - Any plans to implement my suggestion? http://jira.icefaces.org/browse/ICE-4308?focusedCommentId=26593&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_26593
          Arran Mccullough made changes -
          Salesforce Case [5007000000C3nmz] [5007000000C3nmz, 5007000000D3aRY]
          Ken Fyten made changes -
          Link This issue blocks ICE-4975 [ ICE-4975 ]
          Hide
          Ken Fyten added a comment -

          See ICE-5817 for follow-up on your suggestion, Isuru.

          Show
          Ken Fyten added a comment - See ICE-5817 for follow-up on your suggestion, Isuru.
          Hide
          Isuru Perera added a comment -

          Hi Ken, Thanks for informing and considering my suggestion.

          Show
          Isuru Perera added a comment - Hi Ken, Thanks for informing and considering my suggestion.
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Ken Fyten
            • Votes:
              12 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: