Comments (15)
@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.
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.
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.
is this also reproducible on other browsers such as Firefox?
from materialize.
@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.
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.
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.
Hey, nice that you found a solution.
Can you put this in a PR?
Thanks
from materialize.
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.
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.
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.
See https://caniuse.com/css-focus-visible regarding a better approach. Or some polyfill or some solution like the what-input
package.
from materialize.
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.
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.
Closing this issue due to inactivity. Feel free to reopen it if needed !
from materialize.
Related Issues (20)
- [Bug]: Collapsible looks/behaviour changed in version 2.0.3 HOT 1
- .show-on-medium-and-up vs .hide-on-med-and-up HOT 1
- [Bug]: Autocomplete issues HOT 1
- [Bug]: Failed to resolve entry for package "@materializecss/materialize HOT 5
- [Bug]: Clicking on a dropdown trigger twice+ times consecutively causes unexpected results HOT 6
- Creating Components via JavaScript HOT 4
- [Bug]: Dropdown + Window Resize
- Microsoft Defender Antivirus detects "Trojan:Script/Wacatac.H!ml" HOT 8
- [Bug]: Select Options does not overflow cards
- [Bug]: Range input appearance not work on chrome 123, but work on Firefox
- [Bug]: TimePicker is completely broken
- [Bug]: Modal with Fixed Footer Always has Scrollbar HOT 1
- [Bug]: Tonal button seems not presenting HOT 1
- [Bug]: Autocomplete selectOption does nothing HOT 2
- Add "RAIL" material 3 HOT 3
- Marquee Component HOT 1
- Create Theme v2.1.0 HOT 6
- [Bug]: scrollbar appears with modal in 2.1.0 HOT 3
- [Bug]: Feature Discovery animation no longer works in 2.1.0 HOT 3
- samples at https://materializeweb.com/getting-started.html broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from materialize.