From 259e64b9a091905bde80a945f49f3e9104bad103 Mon Sep 17 00:00:00 2001 From: Roy Bregman <48884909+RoyBregman@users.noreply.github.com> Date: Wed, 4 Aug 2021 14:04:23 +0300 Subject: [PATCH] fix(FEV-1057): fix tabbing between chapters when slides are collapsed (#4242) --- .../components/chapters/chapters.css | 3 ++- .../components/chapters/chapters.js | 26 +++---------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/modules/KalturaSupport/components/chapters/chapters.css b/modules/KalturaSupport/components/chapters/chapters.css index c10165ccdf..4e449f52c0 100644 --- a/modules/KalturaSupport/components/chapters/chapters.css +++ b/modules/KalturaSupport/components/chapters/chapters.css @@ -298,6 +298,7 @@ -ms-transform: translateX(-100%); transform: translateX(-100%); height: 0 !important; + visibility: hidden; } .slideBox > .boxImg{ width: 66%; @@ -704,4 +705,4 @@ input#searchBox::-ms-clear { display: -webkit-box; -webkit-box-orient: vertical; } -} \ No newline at end of file +} diff --git a/modules/KalturaSupport/components/chapters/chapters.js b/modules/KalturaSupport/components/chapters/chapters.js index 99876f510e..962348560a 100644 --- a/modules/KalturaSupport/components/chapters/chapters.js +++ b/modules/KalturaSupport/components/chapters/chapters.js @@ -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 @@ -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); @@ -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