ICEfaces
  1. ICEfaces
  2. ICE-11204

ace:linkButton - onclick not being passed through

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.1.0.GA, EE-3.3.0.GA_P04
    • Fix Version/s: 4.2, EE-3.3.0.GA_P05
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When setting some script in the onclick attribute of the ace:linkButton, this script isn't called when clicking the button. Looking at the rendered source code, it isn't shown in the source.

      This was working with the EE 3.3.0 P02 but no longer seems to work on the recent ICEfaces 3 and 4 code bases.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case that shows this issue.

        Steps:

        • Load welcomeICEfaces.jsf
        • Clicking the "Test Link Button" doesn't do anything. It should show a JavaScript alert.
        Show
        Arran Mccullough added a comment - Attached test case that shows this issue. Steps: Load welcomeICEfaces.jsf Clicking the "Test Link Button" doesn't do anything. It should show a JavaScript alert.
        Hide
        Liana Munroe added a comment - - edited

        Tested with ICEfaces 4 trunk, ee-3.3.0 maintenance branch r49711.
        Some other pass-through attributes are also failing when tested with a js alert:
        onclick
        onkeydown
        onfocus

        Many pass-through attributes such as ondblclick, onkeypress, onmousexxx are functioning as expected.
        A QA test application /ICE-11204 has been checked in at:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/linkButton

        The attached test case failed for me when used with EE 3.3.0 P02 libs. There was no js alert launched.

        Show
        Liana Munroe added a comment - - edited Tested with ICEfaces 4 trunk, ee-3.3.0 maintenance branch r49711. Some other pass-through attributes are also failing when tested with a js alert: onclick onkeydown onfocus Many pass-through attributes such as ondblclick, onkeypress, onmousexxx are functioning as expected. A QA test application / ICE-11204 has been checked in at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/linkButton The attached test case failed for me when used with EE 3.3.0 P02 libs. There was no js alert launched.
        Hide
        Arran Mccullough added a comment -

        Support for onclick was added in ICE-7371

        Show
        Arran Mccullough added a comment - Support for onclick was added in ICE-7371
        Hide
        Mircea Toma added a comment - - edited

        Removed the onclick and onkeydown from the list of excluded attributes as defined by the renderer. Modified renderer to append passthrough attribute values to the attributes intrinsically used by the component (such as onfocus and onmouseover).

        Show
        Mircea Toma added a comment - - edited Removed the onclick and onkeydown from the list of excluded attributes as defined by the renderer. Modified renderer to append passthrough attribute values to the attributes intrinsically used by the component (such as onfocus and onmouseover ).
        Hide
        Liana Munroe added a comment - - edited

        Tested with ICEfaces 4 trunk, ee-3.3.0 maintenance branch r49785, Tomcat 8, MS edge, IE 11, 10, 8, FF 47, Chrome 55.
        In all browsers the onclick function is working properly.
        There were some other issues found when using Chrome and MS edge:
        Chrome - After using the onfocus linkButton the js alert popup continually launches after being dismissed.
        MS Edge - After using any of the following once: onmousemove, onmouseover, onfocus, no further js alerts are seen from any other actions taken on the test page.
        This was tested with /ICE-11204.jsf found at:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/linkButton

        Show
        Liana Munroe added a comment - - edited Tested with ICEfaces 4 trunk, ee-3.3.0 maintenance branch r49785, Tomcat 8, MS edge, IE 11, 10, 8, FF 47, Chrome 55. In all browsers the onclick function is working properly. There were some other issues found when using Chrome and MS edge: Chrome - After using the onfocus linkButton the js alert popup continually launches after being dismissed. MS Edge - After using any of the following once: onmousemove, onmouseover, onfocus, no further js alerts are seen from any other actions taken on the test page. This was tested with / ICE-11204 .jsf found at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/linkButton
        Hide
        Mircea Toma added a comment - - edited

        Chrome - After using the onfocus linkButton the js alert popup continually launches after being dismissed.

        When the popup is closed the focus is put back onto the linkButton which will open again the popup, and so on. You can modify the event handler like this to avoid entering the loop:

        <ace:linkButton onfocus="alert('..........'); window.document.body.focus();"  ..../>
        
        Show
        Mircea Toma added a comment - - edited Chrome - After using the onfocus linkButton the js alert popup continually launches after being dismissed. When the popup is closed the focus is put back onto the linkButton which will open again the popup, and so on. You can modify the event handler like this to avoid entering the loop: <ace:linkButton onfocus= "alert('..........'); window.document.body.focus();" ..../>
        Hide
        Mircea Toma added a comment -

        Modified test case to stop using alert() function which interferes with the focus, key, and mouse events in MS Edge.

        Show
        Mircea Toma added a comment - Modified test case to stop using alert() function which interferes with the focus, key, and mouse events in MS Edge.
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces 4 trunk, ee-3.3.0 maintenance branch r49814, Tomcat 8, MS edge, IE 11, 10, 8, 7, FF 47, Chrome 55.

        Show
        Liana Munroe added a comment - Verified ICEfaces 4 trunk, ee-3.3.0 maintenance branch r49814, Tomcat 8, MS edge, IE 11, 10, 8, 7, FF 47, Chrome 55.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: