Button getting white border on focus in IE11 whereas in other browsers black border is being displayed when focused
Environment Information
- Package version(s): 6.186.1
- Browser and OS versions: IE11 and windows 10
Please provide a reproduction of the bug in a codepen:
- go to the link https://github.com/OfficeDev/office-ui-fabric-react/releases/tag/office-ui-fabric-react_v6.186.1
- download source code.
- run the following commands respectively - npm run _rushInstall - npm run _rushBuild - npm start
- open the url http://localhost:4322/#/examples/button
- observe that buttons have white border focus in IE11, whereas in other browsers such as chrome have black border focus
Actual behavior:
focus border is white in color in IE11 for standard button, compound button, command bar button, Icon button etc, whereas in other browsers focus border is in black color
Expected behavior:
focus border should be black in color, it should be similar to other browsers
Priorities and help requested:
Are you willing to submit a PR to fix? No
Requested priority: Normal
Products/sites affected: M365adminUX
images
standard button has white focus borer in IE11 whereas in chrome it's black in color

in chrome

same case with compound button in IE11

in chrome

same case with command bar button in IE11

in chrome

also icon button has white border in IE11, it is not visible because background is also white

whereas in chrome it has black border

These button are also used in commad bar component it is also effecting there.. (in IE11)

(in chrome)

hmm, yup. I'm able to repro this in 6.197.0 as well
I think the answer might be around IE11 and outlines in pseudo elements. If you inspect you can see that the white is coming from the pseudo border (and is displaying properly) but the outline is not working (don't mind the line-throughs....not sure why its displaying like that. you can turn the border on/off and it works)

Ahhhaaa! The outline works, but it's being clipped. Add overflow: visible to the button and the outline shows up.

hello @micahgodbolt if are using single button then we can add some css to the button from the app. what happens to the other buttons such as commadbar buttons, there will be multiple types of buttons in the commadbar, so adding css for each button in the commandbar will be a overhead task.
can we just add overflow:visible in basebutton.styles.ts and sent out the pr? is that a good idea?
yeah, sorry. I wasn't trying to provide a solution for you to apply. I was simply trying to diagnose the problem to make it easier for @marygans to work on this. Next question is, what can we do?
I don't like the idea of adding overflow visibile just to fix an IE11 bug. I"m 99% sure that a change of that scope would break a ton of partners. On the plus side, this only affects Fabric 6 (not 7), so any fix we do isn't something we have to carry on into production today.
Took a quick look to confirm, but buttons are by default overflow: visible.....at least in modern edge

But in IE11 they are defaulted to hidden. Problem is, we never saw the issue on our website because MWF normalizes buttons like this:

@shivasai09 since the problem here is a difference in default behavior between IE11 and modern Edge, the easiest solution on your side, with least chance of causing a break, is to add that above normalize code to your application (can even limit the loading to only IE11).
Another option is to use CSS normalize, which is used for this exact problem. https://github.com/necolas/normalize.css/blob/master/normalize.css#L176
@micahgodbolt i will check it and let you know.
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fabric React!