A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bootstrap-vue/bootstrap-vue/commit/64d556d below:

disable the next/prev controls when the carousel is sl… · bootstrap-vue/bootstrap-vue@64d556d · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+32

-14

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+32

-14

lines changed Original file line number Diff line number Diff line change

@@ -498,19 +498,36 @@ export const BCarousel = /*#__PURE__*/ Vue.extend({

498 498

// Prev and next controls

499 499

let controls = h()

500 500

if (this.controls) {

501 +

const prevHandler = evt => {

502 +

/* istanbul ignore next */

503 +

if (!this.isSliding) {

504 +

this.handleClick(evt, this.prev)

505 +

} else {

506 +

evt.preventDefault()

507 +

}

508 +

}

509 +

const nextHandler = evt => {

510 +

/* istanbul ignore next */

511 +

if (!this.isSliding) {

512 +

this.handleClick(evt, this.next)

513 +

} else {

514 +

evt.preventDefault()

515 +

}

516 +

}

501 517

controls = [

502 518

h(

503 519

'a',

504 520

{

505 521

class: ['carousel-control-prev'],

506 -

attrs: { href: '#', role: 'button', 'aria-controls': this.safeId('__BV_inner_') },

522 +

attrs: {

523 +

href: '#',

524 +

role: 'button',

525 +

'aria-controls': this.safeId('__BV_inner_'),

526 +

'aria-disabled': this.isSliding ? 'true' : null

527 +

},

507 528

on: {

508 -

click: evt => {

509 -

this.handleClick(evt, this.prev)

510 -

},

511 -

keydown: evt => {

512 -

this.handleClick(evt, this.prev)

513 -

}

529 +

click: prevHandler,

530 +

keydown: prevHandler

514 531

}

515 532

},

516 533

[

@@ -522,14 +539,15 @@ export const BCarousel = /*#__PURE__*/ Vue.extend({

522 539

'a',

523 540

{

524 541

class: ['carousel-control-next'],

525 -

attrs: { href: '#', role: 'button', 'aria-controls': this.safeId('__BV_inner_') },

542 +

attrs: {

543 +

href: '#',

544 +

role: 'button',

545 +

'aria-controls': this.safeId('__BV_inner_'),

546 +

'aria-disabled': this.isSliding ? 'true' : null

547 +

},

526 548

on: {

527 -

click: evt => {

528 -

this.handleClick(evt, this.next)

529 -

},

530 -

keydown: evt => {

531 -

this.handleClick(evt, this.next)

532 -

}

549 +

click: nextHandler,

550 +

keydown: nextHandler

533 551

}

534 552

},

535 553

[

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4