AdaptiveMenu/Menu issues with orientation changes

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

Safari on iOS 18.5 iPhone 14 (both physical device and XCode emulator), iPad Air 11" (XCode emulator)

Hello, I’ve found some issues which may be related to this thread:
https://forums.smartclient.com/forum/technical-q-a/276224-adaptivemenu-problem

Below there’s a slightly modified test case. Please run it from the browser console, after opening the showcase with this Density:

  1. On iPad Air 11" in portrait orientation, after clicking the menuButton, you’ll see that the menu covers the ToolStrip: I don’t think it’s correct (actually happens also on desktop browsers)
  2. If, with the menu still opened, you switch to landscape orientation, you’ll see menu items in the menu which before were buttons:
    3. if you switch back to portrait, the ToolStrip is now visible, but the menuButton is the only button in it (BTW if you try to close and reopen the menu, the ToolStrip become covered by the menu, again):

Moreover, using the iPhone 14, when I open the menu in portrait, everything it’s right:

  1. if I switch to landscape with the menu still open, the menu doesn’t adapt its width, nor the ToolStrip changes to add buttons:
    5. then if I switch back to portrait only the menuButton remains in the ToolStrip:
isc.Auth.setRoles(["ROLE_FOO", "ROLE_FOO_S"]);
isc.Auth.setAvailableRoles(["ROLE_FOO", "ROLE_FOO_S", "ROLE_BAR"]);

isc.DynamicForm.create({
    ID: "embeddedForm",
    snapTo: "L",
    snapOffsetLeft: 20,
    defaultLayoutAlign: "center",
    height: 1,
    width: "100%",
    minWidth: 300,
    titleWidth: 1,
    numCols: 4,
    linearMode: true,
    linearNumCols: 3,
    fields: [
        {
            name: "foo",
            showTitle: false,
            valueMap: ['one', 'two', 'three', 'four', 'five']
        },
        {
            name: "bar",
            showTitle: false,
            valueMap: ['one', 'two', 'three', 'four', 'five']
        },
        {
            name: "spacer",
            type: "spacer",
            height: 20
        }
    ]
});

isc.AdaptiveMenu.create({
    ID: "adaptiveMenu",
    menuButtonTitle: "Altro...",
    menuProperties: {
        width: "100%"
    },
    defaultLayoutAlign: "center",
    items: [
        {
            title: "Le Mie Attività",
            icon: "Edit",
            visibleWhen: {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO"}
        },
        {
            title: "Export Planning",
            icon: "Edit",
            visibleWhen: {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO_S"}
        },
        {
            title: "Export Massivo Report",
            icon: "Edit",
            visibleWhen: {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO_S"}
        },
        {
            title: "Report Tecnici",
            icon: "Edit"
        },
        {
            title: "Report Società",
            icon: "Edit"
        },
        {
            title: "Report Attività",
            icon: "Edit",
            visibleWhen: {
                _constructor: "AdvancedCriteria",
                operator: "or",
                criteria: [
                    {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO"},
                    {fieldName: "auth.roles", operator: "contains", value: "ROLE_FOO_S"}
                ]
            }
        },
        {
            title: "Cerca Attività",
            icon: "Edit"
        },
        {
            title: "Aggiorna",
            icon: "Edit"
        },
        {
            title: "Legenda Attività",
            icon: "Edit"
        },
        {isSeparator: true},
        {
            icon: "Edit",
            embeddedComponent: embeddedForm,
            embeddedComponentFields: ["title"]
        }
    ]
});

isc.ToolStrip.create({
    ID: "toolStrip",
    membersMargin: 5,
    members: [
        adaptiveMenu
    ]
});

isc.VLayout.create({
    ID: "vLayout",
    width: "100%",
    height: "100%",
    backgroundColor: "white",
    members: [
        isc.VLayout.create({height:"*"}),
        toolStrip
    ]
}).show()

We have committed a fix that may resolve most of the issues you reported, but it’s not yet available in the public downloads. We’ll update this thread to let you know when it’s in the nightly builds.

Fixes been committed back to SC 13.1 to address the issues you reported. They will be included in tomorrow’s nightly builds, dated 2025-09-09 and beyond.

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

Hi, I’ve just tested the latest 13.1 build:

Safari on iPad Air 11" (XCode emulator)

  1. Fixed - the menu no longer covers the ToolStrip.
  2. & 3. When changing orientation with the menu open, the menu is closed. I don’t know if this is intended behavior, but I think it could be acceptable.

Safari on iOS 18.5 iPhone 14 (XCode emulator)
4. & 5. Here I don’t see any differences compared to the previous behaviour.

Yes, menus are now closed during rotation to avoid inappropriate sizing.

We reproduced cases #4 and #5 that you reported and have made additional fixes, which should be in the next nightly builds of SC 13.1+.

v13.1p_2025-09-17/AllModules Development Only

Thanks, I now see that on iPhone 14 as well the menu closes when changing orientation, and the AdaptiveMenu correctly adjusts to the available space.

Perhaps the only “cosmetic” issue is that in landscape orientation the menu’s navigationBar takes the full available width, while the menuItems do not.

We fixed a separate issue with “sticky width” affecting menus shown with placement:“fillScreen” (so most obvious on handsets). This should address the remaining issue you reported.

Verified fixed back to SC 13.1 in the nightly builds dated 2025-09-25 and beyond.

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

I see the fix, thank you very much!