inveniosoftware / flask-menu

Flask-Menu is a Flask extension that adds support for generating menus.
https://flask-menu.readthedocs.io
Other
53 stars 45 forks source link

Use whole segments instead of prefix when matching for active #62

Closed datashaman closed 6 years ago

datashaman commented 6 years ago

Currently the menu item is marked as active when there is a prefix match on the URL. This creates situations where multiple different menu items appear to be active just because they share a prefix. The match should happen against complete segments within the path.

For example:

Currently, if I navigate to /object, both of the above menuitems will have active set to True which is not intuitive.