Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • Merge requests
  • !19222
An error occurred while fetching the assigned milestone of the selected merge_request.

Focus (visually hidden) input radio/checkbox

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Patrick H. Lauke requested to merge github/fork/patrickhlauke/kbd-navigation-fix-checkbox-radio-toggle-port1 into v4-dev 9 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

This allows for keyboard navigation (e.g. arrow keys left/right to trigger different radio buttons) following an initial mouse click interaction on a radio button or checkbox

A simplified port of https://github.com/twbs/bootstrap/pull/19192 to the new v4 code base

Compare
  • v4-dev (base)

and
  • latest version
    a496cb8b
    1 commit, 2 years ago

1 file
+ 3
- 0

    Preferences

    File browser
    Compare changes
js/src/button.js
+ 3
- 0
  • View file @ a496cb8b

  • Edit in single-file editor

  • Open in Web IDE


@@ -92,7 +92,10 @@ const Button = (($) => {
input.checked = !$(this._element).hasClass(ClassName.ACTIVE)
$(this._element).trigger('change')
}
$(input).trigger('focus')
}
} else {
this._element.setAttribute('aria-pressed',
!$(this._element).hasClass(ClassName.ACTIVE))
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/patrickhlauke/kbd-navigation-fix-checkbox-radio-toggle-port1

Menu

Explore Projects Groups Snippets