Announcement

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

    Menu item is moving with mouse cursor.

    Hi Isomorphic,
    We are using Smart Gwt-5.1 (2th february build)
    Browser: Google Chrome, version: 47.0.2526.106 m

    Issue:menu item is moving with mouse cursor.

    Description:
    Initially click on IMenuButton added to the listgrid fields.
    ListGrid will have many rows and each and very row will have IMenuButton
    When user clicks on first row IMenuButton menu will be displayed, and when user scrolls in list grid,
    observe that menu item will move along with mouse scroll irrespective of corresponding menu item(IMenuButton) .
    Attached Files

    #2
    In your sample, you create the menu and show it as a context menu via showContextMenu(). Since the MenuButton didn't show this menu, it won't move with the MenuButton (your attempt to call button.setMenu() is too late).

    To correct this part of your code, use button.setMenu() then button.showMenu().

    However, you've still got a more fundamental problem: what are you expecting to happen if the MenuButton is scrolled out of view? The framework does the best it can: it will keep moving the Menu according to the position of the (invisible) MenuButton, until it hits the screen edge. But this is awkward for end users, arguably, remaining in place as you currently have it is better. You might want to rethink this interaction to either offer the two items on the menu as separate Buttons, or use a modal dialog to combine the options in the menu with whatever other settings the user needs to provide to complete the interaction.

    Comment

    Working...
    X