From 93518f34a00b4712f38f51a47e1e4b2c61e2d8f4 Mon Sep 17 00:00:00 2001 From: Erik Brommers Date: Thu, 5 Oct 2023 11:43:39 -0700 Subject: [PATCH] Work on #507 For some weird reason, setting contenteditable was moving the scroll on the initial render for Find in Documents. Moved the call to set contenteditable up in the method, so that the scroll call doesn't get overridden. --- www/js/views/AdaptViews.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/js/views/AdaptViews.js b/www/js/views/AdaptViews.js index b2a63bb7..558a364b 100644 --- a/www/js/views/AdaptViews.js +++ b/www/js/views/AdaptViews.js @@ -461,6 +461,10 @@ define(function (require) { $("#SearchRS").html(searchRS); $("#SearchIndex").html("(" + (window.Application.searchIndex + 1) + "/" + window.Application.searchList.length + ")"); } + // disable editing blank verses if needed + if (this.allowEditBlankSP === false) { + $(".nosource").prop('contenteditable', false); // no source -- set target to read-only + } if (project.get('lastAdaptedSPID').length > 0) { // not searching, but there is a sourcephrase ID from our last session -- select it now isSelecting = true; @@ -504,10 +508,6 @@ define(function (require) { $("#mnuTranslations").removeClass("menu-disabled"); $("#mnuFindRS").removeClass("menu-disabled"); } - // disable editing blank verses if needed - if (this.allowEditBlankSP === false) { - $(".nosource").prop('contenteditable', false); // no source -- set target to read-only - } // hide gloss / free translation lines if needed if (this.ShowGlossFT === false) { // hide edit mode dropdown menu items