materialize icon indicating copy to clipboard operation
materialize copied to clipboard

CloseOnClick property in sideNav should only be applicable in small screen when menu is usually hidden.

Open ancientdemon opened this issue 10 years ago • 7 comments

Consider the following html

image

Here I have specified 'fixed' style which keeps the sideNav fixed for larger screens and it hides the sideNav for smaller screens. This works as expected. However, issues is that I want the sideNav to close upon clicking a menu option and hence I am also doing this in code.

image

My expectation is that closeOnClick: true is only applicale to the small screen, where menu is usually hidden by default. I don't want the menu to close upon click in larger screens (since I have used "fixed" style). Therefore the logic in materialize-css javaScripts should be fixed to use closeOnClick: true will not affect the "fixed" behavior.

Due to its current behaviour in larger (non mobile) screens where hamburger icon is not visible, the closing of the menu means there is no way that user can get back to the menu again.

ancientdemon avatar Dec 21 '15 19:12 ancientdemon

I agree with that. It would be really good if closeOnClick only closed a fixed menu if it's displayed on a small screen.

Thanood avatar Feb 01 '16 15:02 Thanood

Related issue

fixed sidenav with closeOnClick enabled #1426

ancientdemon avatar Feb 01 '16 19:02 ancientdemon

+1

jacek213 avatar May 09 '16 12:05 jacek213

This is resolved in this PR. Would be nice to see it merged:

https://github.com/Dogfalo/materialize/pull/945

Nick-Riggs avatar Jun 16 '16 20:06 Nick-Riggs

would like to see this fix as well. Makes no sense the way it is right now.

chobo2 avatar Aug 15 '16 23:08 chobo2

+1

fIa5h avatar Aug 16 '16 00:08 fIa5h

Duplicate of https://github.com/Dogfalo/materialize/issues/1426

tomscholz avatar Apr 18 '17 11:04 tomscholz