Skip to content

[Pagination] Disable buttons trigger onPrevious/onNext when using the keys and render the tooltips #668

@tleunen

Description

@tleunen

Issue summary

3 things I noticed about the pagination, keys and disable state:

  1. The tooltip is shown on disabled pagination buttons
  2. When the tooltip appears on a disabled button, it's hard to hide it. Hovering out a normal button hide the tooltip, but it's not the case for the disabled button.
  3. Triggering the key event triggers the previous/next callback, even if the button is disabled

kapture 2018-11-22 at 15 13 38

Expected behavior

  • I'm not sure if 1. is expected or not. Having it or not could be valid I guess.
  • Hovering out of the button should hide the tooltip though.
  • Key presses should not trigger the callbacks if hasPrevious/hasNext is false (button disabled).

Actual behavior

See issue.

Steps to reproduce the problem

  1. Use the codesandbox and play each bullet points in the summary

Reduced test case

https://codesandbox.io/s/ywrxx3qp8j

Metadata

Metadata

Assignees

Labels

AccessibilityNeeds design, development, or content work relating to accessibility.BugSomething is broken and not working as intended in the system.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions