From 3ea8cf5c31f4b619504b7bffd69606534e919057 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 9 Dec 2024 17:43:25 +0100 Subject: [PATCH] fix(material/paginator): ignore clicks on disabled buttons (#30138) The changes in #29379 made the paginator interactive while they're disabled in order to improve accessibility, but as a result it also allows for the buttons to navigate while they're disabled. These changes add internal checks to ensure that the buttons don't navigate while disabled. I've also cleaned up the logic a bit so we don't have four different places that deal with navigations. Fixes #30124. (cherry picked from commit 8d3bca5eb0cc304075c85aa56ecdd6785e7e2a2d) --- src/material/paginator/paginator.html | 16 ++--- src/material/paginator/paginator.spec.ts | 72 ++++++++++++++++---- src/material/paginator/paginator.ts | 56 ++++++++------- tools/public_api_guard/material/paginator.md | 1 + 4 files changed, 101 insertions(+), 44 deletions(-) diff --git a/src/material/paginator/paginator.html b/src/material/paginator/paginator.html index 208966624e56..10ae36fabfb2 100644 --- a/src/material/paginator/paginator.html +++ b/src/material/paginator/paginator.html @@ -44,11 +44,11 @@ @if (showFirstLastButtons) {