From: Vincent Vanwaelscappel Date: Wed, 25 Jun 2025 13:58:34 +0000 (+0200) Subject: wip #7547 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=005b7f16c4198a17f1e0df1eee821d98284ae89b;p=fluidbook-html5.git wip #7547 @2 --- diff --git a/js/libs/fluidbook/fluidbook.keyboard.js b/js/libs/fluidbook/fluidbook.keyboard.js index 8d780d76..bf37f6fe 100644 --- a/js/libs/fluidbook/fluidbook.keyboard.js +++ b/js/libs/fluidbook/fluidbook.keyboard.js @@ -85,7 +85,7 @@ FluidbookKeyboard.prototype = { currentSection = 0; } let loop = 0; - while (!this.tabNavigation(selectors[currentSection], dir, false)) { + while (!this.tabNavigation(selectors[currentSection], dir, false, loop > 0)) { currentSection += dir; if (currentSection >= selectors.length || currentSection < 0) { return false; @@ -98,7 +98,10 @@ FluidbookKeyboard.prototype = { return true; }, - tabNavigation: function (selector, dir, loop) { + tabNavigation: function (selector, dir, loop, switchList) { + if (switchList === undefined) { + switchList = false; + } if (loop === undefined) { loop = true; } @@ -122,14 +125,17 @@ FluidbookKeyboard.prototype = { console.log(selector, 'nothing here'); return false; } - let res = this._navigate(list, dir, ['focus'], loop); + let res = this._navigate(list, dir, ['focus'], loop, switchList); if (!res) { console.log(selector, 'end of list'); } return res; }, - _navigate: function (list, dir, actions, loop) { + _navigate: function (list, dir, actions, loop, switchList) { + if (switchList === undefined) { + switchList = false; + } if (loop === undefined) { loop = true; } @@ -148,6 +154,9 @@ FluidbookKeyboard.prototype = { next = (nb + index + dir) % nb; } else { next = index + dir; + if (switchList && next === -2) { + next = nb - 1; + } if (next >= nb || next < 0) { return false; } diff --git a/js/libs/fluidbook/fluidbook.tooltip.js b/js/libs/fluidbook/fluidbook.tooltip.js index 25e16e48..0976b379 100644 --- a/js/libs/fluidbook/fluidbook.tooltip.js +++ b/js/libs/fluidbook/fluidbook.tooltip.js @@ -177,7 +177,6 @@ FluidbookTooltip.prototype = { }, displayTooltip: function (text, style, css) { - console.log('displayTooltip', text, style, css); if (text === '-') { return this.hideTooltip('before displayTooltip'); } @@ -231,7 +230,7 @@ FluidbookTooltip.prototype = { }, hideTooltip: function (where) { - console.log('hide tooltip', where); + //console.log('hide tooltip', where); $("#tooltip").hide().text(''); },