Fixed #4908 - For Carousel

pull/4925/head
tugcekucukoglu 2023-12-01 10:03:58 +03:00
parent 5b72a7732f
commit d8143f212e
1 changed files with 4 additions and 2 deletions

View File

@ -101,7 +101,7 @@ import ChevronLeftIcon from 'primevue/icons/chevronleft';
import ChevronRightIcon from 'primevue/icons/chevronright';
import ChevronUpIcon from 'primevue/icons/chevronup';
import Ripple from 'primevue/ripple';
import { DomHandler, UniqueComponentId, ObjectUtils } from 'primevue/utils';
import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils';
import BaseCarousel from './BaseCarousel.vue';
export default {
@ -453,6 +453,8 @@ export default {
case 'ArrowUp':
case 'ArrowDown':
case 'PageUp':
case 'PageDown':
event.preventDefault();
break;
@ -481,7 +483,7 @@ export default {
this.changedFocusedIndicator(activeIndex, 0);
},
onEndKey() {
const indicators = [...DomHandler.find(this.$refs.indicatorContent, '[data-pc-section="indicator"]r')];
const indicators = [...DomHandler.find(this.$refs.indicatorContent, '[data-pc-section="indicator"]')];
const activeIndex = this.findFocusedIndicatorIndex();
this.changedFocusedIndicator(activeIndex, indicators.length - 1);