Announcement

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

    FormItemIcon.showOver has no effect on hover

    SmartClient Version: v13.1p_2025-09-25/AllModules Development Only (built 2025-09-25)

    Chrome, FF on MacOS

    Hi, I noticed that FormItemIcon.showOver doesn’t seem to have any effect. I also tried with the different options of showOverWhen, and with the icon inline or not.
    When I hover, the icon doesn’t change (in this case class="icon" remains unchanged):

    Code:
    var form = isc.DynamicForm.create({
        autoDraw: false,
        items: [{
            name: "search",
            title: "Search Term",
            width: 200,
            showOverIcons: true,
            icons: [{
                name: "clear",
                src: "Cancel",
                showOver: true,
                inline: true,
                prompt: "Clear this field",
                showOverWhen: "icon",
                click: function (form, item, icon) {
                    item.clearValue();
                    item.focusInItem();
                }
            }]
        }]
    });
    
    isc.VStack.create({
        width: "100%",
        members: [form]
    });

    #2
    hi Claudio, thanks for the report.

    What you're seeing is a bug, but it's not with showOver - the default class applied to FormItemIcons (FormItem.iconBaseStyle, and it turns out, also FormItemIcon.baseStyle) is not having states applied when the element is updated for state. This is also what happens in your other thread, where the _base image was getting the "icon" style by default, but the other entries weren't getting the stateful ones.

    We'll address this shortcoming in both cases and let you know when it's fixed.

    In the meantime, if you set the class in the src string, it'll work - src: "Cancel:cssClass:icon"
    Last edited by Isomorphic; 26 Sep 2025, 03:25.

    Comment


      #3
      hi Claudio,

      We've made a change that means a FormItemIcon will always get the states of its base-style, whether you set cssClass in the src-string, set baseStyle on the icon itself, or just rely on the default behavior of using the builtin "icon" class, via FormItem.iconBaseStyle.

      Note that this fixes a general issue in Shiva, where all builtin pickers and other FormItemIcons correctly used the base "icon" style, but some were stateful and others weren't - if they had cssClass in the src-string, they were stateful; if they relied on FormItem.iconBaseStyle, they weren't.
      Last edited by Isomorphic; 26 Sep 2025, 22:35.

      Comment


        #4
        SmartClient Version: v13.1p_2025-09-27/AllModules Development Only (built 2025-09-27)

        Thank you very much for the fix. I can see all the changes in Shiva (and thanks for pointing this out, since I need to update my custom skin).

        Comment

        Working...
        X