mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Fix screenshot carousel when focused on the carousel control and pressing arrow keys
This commit is contained in:
parent
f1b046b50e
commit
fc800935aa
1 changed files with 3 additions and 0 deletions
|
@ -67,11 +67,14 @@ module.exports = class AboutView extends RootView
|
|||
@scrollToLink('#contact')
|
||||
|
||||
onRightPressed: (event) ->
|
||||
# Special handling, otherwise after you click the control, keyboard presses move the slide twice
|
||||
return if event.type is 'keydown' and $(document.activeElement).is('.carousel-control')
|
||||
if $('#screenshot-lightbox').data('bs.modal')?.isShown
|
||||
event.preventDefault()
|
||||
$('#screenshot-carousel').carousel('next')
|
||||
|
||||
onLeftPressed: (event) ->
|
||||
return if event.type is 'keydown' and $(document.activeElement).is('.carousel-control')
|
||||
if $('#screenshot-lightbox').data('bs.modal')?.isShown
|
||||
event.preventDefault()
|
||||
$('#screenshot-carousel').carousel('prev')
|
||||
|
|
Loading…
Reference in a new issue