GithubHelp home page GithubHelp logo

Comments (15)

JayDijkstra avatar JayDijkstra commented on July 26, 2024 2

@Smankusors thanks for your solution. The following override works as a (temporarily) fix in both Google Chrome and Mozilla Firefox:

li a.dropdown-trigger:focus {
    outline: none;
}

from materialize.

JayDijkstra avatar JayDijkstra commented on July 26, 2024 1

Dear @wuda-io, by forking the project and following the contribution guidelines to create a Pull-Request, I get a lot of merge-conflicts on my branch when trying to pull in the upstream master branch. The branch itself is created of the v1-dev because other pull-requests are based on this same branch.

It is not clear to me if my branch needs to be created of the master or v1-dev branch.

from materialize.

rdevroede avatar rdevroede commented on July 26, 2024 1

The issue is that the focus ring appears on mouse over or out (can't remember) and stays visible. It should never appear for desktop mouse usage, only on actual focus with the keyboard tab key. Even when someone would want it to appear on a mouse event, it should disappear on mouse out.

from materialize.

Smankusors avatar Smankusors commented on July 26, 2024

is this also reproducible on other browsers such as Firefox?

from materialize.

JayDijkstra avatar JayDijkstra commented on July 26, 2024

@Smankusors in Firefox the border is less visible (white-dashed), but does also occur. It can be reproduced by adding the :focus-visible state, to the <li> parent of the dropdown-trigger, in the developer console.

from materialize.

JayDijkstra avatar JayDijkstra commented on July 26, 2024

What I did forget to mention is that a similar (same) issue has been created in Dogfalo#6051 back in 2018. This comment is just for giving you as much information as I can.

from materialize.

Smankusors avatar Smankusors commented on July 26, 2024

I think this come from the browser styling. Perhaps this can be solved by simply removing the outline (which is bad for accessibility), or create own outline style when the element focused.

Temporary, you can add CSS rule like outline: none to remove the built in outline.

from materialize.

wuda-io avatar wuda-io commented on July 26, 2024

Hey, nice that you found a solution.
Can you put this in a PR?
Thanks

from materialize.

wuda-io avatar wuda-io commented on July 26, 2024

Yes you are right! The correct approach is, to use is the default branch v1-dev, and NOT the master. The documentation needs to be updated.
Thanks for your hint.

from materialize.

wuda-io avatar wuda-io commented on July 26, 2024

Sorry, I thought this was a bug. But as @Smankusors and @DanielRuf suggested it is intended behavoir when using keyboard only. Nevertheless, thank you for your contribution in first place. At least we found out that we have to update the docs. Cheers mate.

from materialize.

Smankusors avatar Smankusors commented on July 26, 2024

Sorry, I thought this was a bug. But as @Smankusors and @DanielRuf suggested it is intended behavoir when using keyboard only. Nevertheless, thank you for your contribution in first place. At least we found out that we have to update the docs. Cheers mate.

yeah the styling is intended behavior. But when this is applied without using any keyboard is kinda not expected. Unfortunately I can't reproduce this like @JayDijkstra's screenshot without adding :focus state on Chrome 89.

But on Firefox 87.0b9, I got 1px dashed rectangle like he described.

Also I haven't tried to reproduce this on Linux system yet.

from materialize.

DanielRuf avatar DanielRuf commented on July 26, 2024

See https://caniuse.com/css-focus-visible regarding a better approach. Or some polyfill or some solution like the what-input package.

from materialize.

DanielRuf avatar DanielRuf commented on July 26, 2024

The "ugly" black border: that is Chrome's / Chromium's new focus ring design and their "fault".
We should never remove it but probably style it differently.

from materialize.

JayDijkstra avatar JayDijkstra commented on July 26, 2024

It seems that this issue only occurs when using the option hover: true on a M.dropdown() element. By disabling this, it seems to resolve this issue for me, however this is only suitable when you actually do not need the hover functionality on our dropdown buttons. Maby this is some valuable information for you.

from materialize.

LoganTann avatar LoganTann commented on July 26, 2024

Closing this issue due to inactivity. Feel free to reopen it if needed !

from materialize.

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.