Commit 2854151c authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #36181

parent a19d7821
......@@ -1243,7 +1243,7 @@ ParaRun.prototype.Search_GetId = function(bNext, bUseContentPos, ContentPos, Dep
var Mark = this.SearchMarks[SPos];
var MarkPos = Mark.SearchResult.StartPos.Get(Mark.Depth);
if ( MarkPos >= StartPos && MarkPos < NearPos )
if (Mark.SearchResult.ClassesS.length > 0 && this === Mark.SearchResult.ClassesS[Mark.SearchResult.ClassesS.length - 1] && MarkPos >= StartPos && MarkPos < NearPos)
{
NearElementId = Mark.SearchResult.Id;
NearPos = MarkPos;
......@@ -1271,7 +1271,7 @@ ParaRun.prototype.Search_GetId = function(bNext, bUseContentPos, ContentPos, Dep
var Mark = this.SearchMarks[SPos];
var MarkPos = Mark.SearchResult.StartPos.Get(Mark.Depth);
if ( MarkPos < StartPos && MarkPos > NearPos )
if (Mark.SearchResult.ClassesS.length > 0 && this === Mark.SearchResult.ClassesS[Mark.SearchResult.ClassesS.length - 1] && MarkPos < StartPos && MarkPos > NearPos)
{
NearElementId = Mark.SearchResult.Id;
NearPos = MarkPos;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment