Display of found object disappears
Dear experts,
My FindSomething function is quite successful. The found objects are always selected and hence I have a visible clue what was found. Three objects, however loose their selection as soon as the button function is left:
- Automatic Hyphen: the cursor is just behind it (UI selects the hyphen)
- Object style override: I do not see what is the object (UI selects the object: frame, graphic)
- Object Style tag (UI selects the object: frame, graphic)
KLD_F.ButtonFind = function () { // =========================
var oTR, iFindType, iFS, iFV, iMode, sSearch, bWord, bCase, bBack;
// ...
$.bp(true);
oTR = KLD_F.FindSomething (iFS, iFV, sSearch, iMode, bWord, bCase, bBack);
if (oTR == undefined) {
alert ("Object not found");
return;
}
} //--- end of ButtonFind -----------------------------------
When stepping through the function the selection disappears as soon as I reach the last line.
What happens here?
Additional observations for AutoHyphen (2020-12-10 12:43)
- The cursor at the location after the found for AutoHyphen does not blink. It blinks only after a screen refresh (CTRL+l).
- The reported oTR.beg.offset is the same as oTR.end.offset. When reducing the beg.offset to be one and then setting the TextSelection to this modifies oTR also the character before the AutoHyphen is selected.

