Visitar URL original
Clicking space on a checkbox button · Issue #4474 · angular-ui/bootstrap · GitHub
Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Clicking space on a checkbox button #4474

Closed

Description

@Foxandxss

There is code to toggle a checkbutton with space. If you go to the demo and do it, it will toggle twice. I haven't checked it yet so I open this issue to not forget.

Activity

  1. wesleycho commented on Sep 26, 2015

    @wesleycho
    Contributor

    I implemented it for accessibility reasons originally.

  2. Foxandxss commented on Sep 26, 2015

    @Foxandxss
    ContributorAuthor

    Yes, but I don't think it should trigger the toggling twice, right?

  3. wesleycho commented on Sep 26, 2015

    @wesleycho
    Contributor

    No, that's a bug then. I just mentioned it for context.

  4. Foxandxss commented on Oct 1, 2015

    @Foxandxss
    ContributorAuthor

    Wes, I checked and basically the PR you made to add accessibility is not needed. It works without it. I am not completely sure if it works nice with screenreaders and stuff, but a button is always clickable with space.

    The thing is, I would like to leave the test, but the keypress event won't work. I am not sure if under the hood the space counts as a click instead of keypress.

    Thoughts?

  5. wesleycho commented on Oct 1, 2015

    @wesleycho
    Contributor

    Hm, maybe I was mistaken in my attempt to fix it.

    That sounds good - as long as we have a test around it and this is fixed, I'm all for it.

  6. Foxandxss commented on Oct 1, 2015

    @Foxandxss
    ContributorAuthor

    Yeah, but test how. I have no idea because I don't know how does this work behind the scenes. Is the space on a button considered a click? If so, how to test that?

  7. wesleycho commented on Oct 1, 2015

    @wesleycho
    Contributor

    It just needs to behave like a click and toggle the button model

  8. Foxandxss commented on Oct 1, 2015

    @Foxandxss
    ContributorAuthor

    And it does my friend and it does, but no idea how to test that in a special way.

  9. wesleycho commented on Oct 1, 2015

    @wesleycho
    Contributor

    The pre-existing test may be fine

  10. added a commit that references this issue on Oct 16, 2015
    a06984a
  11. added a commit that references this issue on Sep 28, 2024
    e8808d3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions