Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #31949
Closed
Open
Issue created Oct 22, 2020 by Administrator@rootContributor

<button> and <a> dropdown-items appear differently on focus in Chromium

Created by: bbugh

I originally reported this in the bootstrap-vue repository but it appears to be an upstream issue, so I'm copying most of that bug report over to here with some tweaks for context.

Describe the bug

In Chromium, dropdown-item on a button shows a border when :focused, but dropdown-item on a a tag does not.

image

(Backgrounds are lightened to show the border effect)

dropdown-item on a button seems to be picking up the button outline: -webkit-focus-ring-color effect from Reboot.

https://github.com/twbs/bootstrap/blob/ebd9eb105ab094af747c09082ced1df71aaec123/scss/_reboot.scss#L419-L422

Firefox does not support -webkit-focus-ring-color so it show the single dotted outline on both a elements and button elements.

This issue arose when we started using a dropdown that includes both button and a tag dropdown-items, so a user clicking and/or using the keyboard will see two different focus behaviors in the same menu.

Steps to reproduce the bug

  1. Create a dropdown
  2. Add a button dropdown-item
  3. Add a link dropdown-item
  4. Observe that their focus behavior is different

demo

Expected behavior

I would expect the designs of these to behave consistently on all browsers, either both with or both without the outline.

Versions

Libraries:

  • Bootstrap: 4.5.3

Environment:

  • Device: Mac
  • OS: Mojave
  • Browser: Firefox (consistent), Chromium (this issue)
  • Version: 81.02, 86.0.4240.99

Demo link

https://codesandbox.io/s/b-dropdown-item-button-styling-1ier8?file=/App.vue

Assignee
Assign to
Time tracking