Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu items rippling without being set, and are accepting clicks with no click handler set #142

Closed
OvermindDL1 opened this issue Aug 4, 2016 · 1 comment

Comments

@OvermindDL1
Copy link
Contributor

As of elm-mdl version 7.0.0 the menu items themselves are rippling when they should not be. My menu's are defined as:

Menu.render Mdl
                pidx
                mdl
                [ Menu.topRight
                , Menu.icon iconname
                , Menu.ripple
                ]
                items

Where each item is defined as:

view_msg_inputarea_options_btn_menu_item divider enabled pidx mdl name iconname msgType =
    Menu.Item
      [ if divider then Menu.divider else Options.nop
      , if enabled then Options.nop else Menu.disabled
      ]
      [ Button.render Mdl
          pidx
          mdl
          [ Button.ripple
          , button_onClick msgType
          ]
          [ Icon.i iconname
          , text name
          ]
      ]

So both my button ripples, and the background of the menu item ripples distinctly. The menu item itself also seems to send no onclick message, nor should it since that should be handled by my button, or the button should be disallowed and it should be handled by the item. It seems the 'ripple' property on the menu does not apply to the menu button, but rather the menu items, so no way to set them individually.
bug demonstration

debois added a commit that referenced this issue Aug 5, 2016
Fix ripples / onSelect engaging on disabled menu items.

Now maps over offsetTops, offsetHeights rather than continuously
looking up in Arrays. Avoids conversion List -> Array on Open event.

Fix #142.
@debois
Copy link
Owner

debois commented Aug 6, 2016

The duplicate ripple will be fixed in a shortly upcoming point release.

You might want to consult the Material Design specification on menus—I'm not sure you're supposed to put controls beyond checkmarks in lists.

@debois debois closed this as completed Aug 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants