Code Monkey home page Code Monkey logo

Comments (4)

vnbaaij avatar vnbaaij commented on July 25, 2024

To get the same working as on the demo site, line 4 of NavMenu.razor should be changed to:

<nav class="sitenav" aria-labelledby="main-menu" >

(ie remove the onclick code)

from fluentui-blazor.

MarvinKlein1508 avatar MarvinKlein1508 commented on July 25, 2024

@vnbaaij in doing so, the nav won't close at all unless you close it manually. Is there any easy way to only close it when you click on an element which has an href defined?

from fluentui-blazor.

coderdnewbie avatar coderdnewbie commented on July 25, 2024

Vincent,

I have a theoretical solution to this problem.

Keep the onclick code in class="sitenav" but have a StopPropagation attribute in FluentNavGroup so that the event is not bubbled up. Therefore for this to work a StopPropagation attribute would be needed in the FluentNavGroup like it is in the FluentKeyCode.

Is this possible? What do you think?

Thanks.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on July 25, 2024

@MarvinKlein1508, @coderdnewbie see PR #2183 for a better solution for both demo and template generated sites

from fluentui-blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.