Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    New toggleswitch doesn't trigger form click events?

    Hey, i think i have found a bug.

    TextItems, AreaItems, most form components trigger a clickevent when clicked on, so you can add a ClickHandler on the form to do stuff.

    The new 13.1 ToggleItem doesn't trigger those events. Would be great if it did.

    #2
    We've fixed this for tomorrow's builds, dated January 24 and later - you'll be able to catch the click in the form's click or itemChanged handlers.

    Comment


      #3
      Hey, thanks for quick response. Great stuff.

      Comment


        #4
        OK, so i just upgraded to February 6, and i have to say that I'm not noticing a difference.

        If i click inside the square on a textbox, checkbox or other components i get the click, but if i click above the toggleitem i get nothing.

        I add the clickhandler to the form. i.e.:

        Code:
        form.addClickHandler(clickEvent -> {
        //doing stuff            
        });
        EDIT: build number in the console: SmartClient Version: v13.1p_2025-02-05/Pro Deployment (built 2025-02-05)
        Last edited by mathias; 7 Feb 2025, 00:06.

        Comment


          #5
          We're seeing this work as expected, in SmartClient and SmartGWT - in the specific build you mentioned, your Java code shows a popup dialog when you click anywhere on the ToggleItem, if you call SC.say().

          Code:
          form.addClickHandler(clickEvent -> {
              SC.say("clicked");
          });
          You mentioned clicking "above" the item - do you mean actually above it, outside of the visual toggle? That also works for us. If you mean that you have given the actual toggle-child a short height and are clicking outside of the toggle but still inside of the item, please show your code for it.

          Comment

          Working...
          X