From b2df600ba762f60e01dfaa2d71772052920c2296 Mon Sep 17 00:00:00 2001 From: Lily2point0 Date: Tue, 13 Jun 2017 14:04:41 +0100 Subject: [PATCH] navigation adjustments --- src/js/oCrossword.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/js/oCrossword.js b/src/js/oCrossword.js index 77ee8fc..c2e7d5a 100644 --- a/src/js/oCrossword.js +++ b/src/js/oCrossword.js @@ -646,7 +646,7 @@ OCrossword.prototype.assemble = function assemble() { e.target.value = ''; gridSync.grid.textContent = e.target.value; - if(gridSync.defSync) { + if(!!gridSync.defSync) { let defSync = cluesEl.querySelector('input[data-link-identifier="' + gridSync.defSyncInput +'"]'); defSync.value = e.target.value; } @@ -674,8 +674,8 @@ OCrossword.prototype.assemble = function assemble() { setTimeout(function(){ gridSync.grid.textContent = e.target.value; - - if(gridSync.defSync) { + + if(!!gridSync.defSync) { let defSync = cluesEl.querySelector('input[data-link-identifier="' + gridSync.defSyncInput +'"]'); defSync.value = e.target.value; } @@ -795,18 +795,15 @@ OCrossword.prototype.assemble = function assemble() { if(!isMobile) { isTab = true; - } - - if(direction === 1) { - clueNavigationNext.click(); - } else { - if(isTouch()) { - clueNavigationPrev.click(); + + if(direction === 1) { + clueNavigationNext.click(); } else { - def.click(); + def.click(); } + } else { + isTab = false; } - } }