From c8b69e26f9d54340040f7a75f5135e90e6422ac6 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Fri, 6 Dec 2024 11:46:49 +0100 Subject: [PATCH] fix(material/paginator): ignore clicks on disabled buttons 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. --- 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) {