Skip to content

Commit

Permalink
Work on adapt-it#507
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eb1 committed Oct 5, 2023
1 parent b334318 commit 93518f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions www/js/views/AdaptViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 93518f3

Please sign in to comment.