From 42c3b9d0a59d86337a110869d2dbf3f430d8b68c Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Mon, 24 Dec 2018 23:37:35 +0300 Subject: [PATCH] Prevent disabled/readonly rating from getting focus --- src/components/rating/Rating.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/rating/Rating.vue b/src/components/rating/Rating.vue index c98cfb222..5c134d0d4 100644 --- a/src/components/rating/Rating.vue +++ b/src/components/rating/Rating.vue @@ -1,7 +1,7 @@ @@ -45,6 +45,9 @@ export default { 'p-disabled': this.disabled } ]; + }, + focusIndex() { + return (this.disabled || this.readonly) ? null : '0'; } } }