Skip to content

Commit

Permalink
fix(FEV-1057): fix tabbing between chapters when slides are collapsed (
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyBregman authored Aug 4, 2021
1 parent e1de274 commit 259e64b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
3 changes: 2 additions & 1 deletion modules/KalturaSupport/components/chapters/chapters.css
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
-ms-transform: translateX(-100%);
transform: translateX(-100%);
height: 0 !important;
visibility: hidden;
}
.slideBox > .boxImg{
width: 66%;
Expand Down Expand Up @@ -704,4 +705,4 @@ input#searchBox::-ms-clear {
display: -webkit-box;
-webkit-box-orient: vertical;
}
}
}
26 changes: 3 additions & 23 deletions modules/KalturaSupport/components/chapters/chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@

_this.log("Total pending items: " + _this.pendingMediaItems.length);

//Last cuepoint duration is the entry duration minus cuepoint start time,
//Last cuepoint duration is the entry duration minus cuepoint start time,
//but in live we don't have duration so last cuepoint doesn't have duration.
//So in live cuepoints whenever a new cupoint arrives we can calculate the previous last cuepoint
//duration using the new cuepoint, e.g. new cuepoint strat time minus previous cuepoint start time
Expand Down Expand Up @@ -472,7 +472,7 @@
var clearDuplicatedCP = items.filter(function( item,index,allInArray ) {
return _this.getPlayer().kCuePoints.removeDuplicatedCuePoints(allInArray,index);
});

var previewCuePointTag = _this.getPlayer().kCuePoints.getPreviewCuePointTag();
var filterItems = clearDuplicatedCP.filter(function( item ) {
return _this.getPlayer().kCuePoints.validateCuePointTags(item, previewCuePointTag);
Expand Down Expand Up @@ -1271,27 +1271,7 @@
}
}
})
//Set handler for TAB between chapters and slides
.off('focus').on('focus', function(e){
//Calculate if TAB forward or TAB backward(SHIFT+TAB)
var prev = $(e.relatedTarget ).data("mediaboxIndex");
var cur = $(this).data("mediaboxIndex");
var direction = (cur-prev) === 1 ? 1 : 0;
//Get the associated chapter of the slide
var slideChapterIndex = $(this).data( "chapterIndex" );
var chapter = _this.getMediaListDomElements()
.filter( ".chapterBox[data-chapter-index=" + slideChapterIndex + "]" );
chapter = $(chapter);
//If slide is under a collapsed chapter then go to associated chapter
var chapterCollapsed = (chapter.attr("data-chapter-collapsed") === "true");
if (chapterCollapsed){
var targetChapter = _this.getMediaListDomElements()
.filter( ".chapterBox[data-chapter-index=" + (slideChapterIndex + direction ) + "]" );
if (targetChapter) {
targetChapter.focus();
}
}
});

this.handleHomeEndKeys = function (e) {
if(e.keyCode === 35) {
// end key pressed
Expand Down

0 comments on commit 259e64b

Please sign in to comment.