question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TimePicker] ClockNumber has weird focus outline on Safari

See original GitHub issue

When open a TimePicker, Safari renders weird focus outline.

I think this behavior was introduced by #26400.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Workaround

https://github.com/mui-org/material-ui/blob/a533d062df191a95478a663a9f926de4f94b3046/packages/material-ui-lab/src/ClockPicker/Clock.tsx#L270-L279

div[role="listbox"] {
  outline: none;
}

Current Behavior 😯

Chrome/Firefox

current: chrome/firefox

Safari

current: safari

Expected Behavior 🤔

Chrome/Firefox/Safari

expected

Steps to Reproduce 🕹

Steps:

  1. Open https://next.material-ui.com/components/time-picker/#basic-usage.
  2. Open TimePicker.
  3. (If you are using Safari) Some weird focus outline appears.

Your Environment 🌎

  • Safari 14.1.1 (16611.2.7.1.4)
  • Mobile Safari (iPadOS 14.5.1)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
BC-Mcommented, Jan 11, 2022

Add following prop to TimePicker as workaround:

DialogProps={{
  PaperProps: {
    sx: { '& *:focus': { outline: 'none' } },
  },
}}

Try here: codesandbox

However, since I do not know the side effects, please use with caution!

2reactions
samanmovagharcommented, Mar 10, 2022

Yes, exactly, this is a bug for MuiPaper, after I have changed on theme default props, the bug has been fixed on Safari @markedwards

Screenshot 2022-03-10 at 15 07 24
Read more comments on GitHub >

github_iconTop Results From Across the Web

css - On Safari, why is there a focus outline appearing around ...
When the dialog opens, the browser thinks that <embeddedservice-chat-header> has focus. You can see this by issuing the command document.
Read more >
Safari focus outline on buttons leaves artifacts after blur - Drupal
Safari outlines take into account absolutely positioned child elements, so it winds up outlining the tooltip that appears when the button is ......
Read more >
最新趨勢觀測站- chrome button focus outline的推薦與評價
Maybe it's not a bug and you thought about this already, but it seems strange that outline-none doesn't set outline-none on focus too,...
Read more >
UNPKG - @copart/notes-component
node_modules/material-ui/TimePicker/ClockNumber.js",". ... [].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR ...
Read more >
Untitled
Soy libre y no me sirve ricardo arjona, Perfect face soft focus highlighter, ... Download safari 10 for windows 7, Links club apartments...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found