Loading...
 
Skip to main content

Browser search fails to find some term occurences in CodeMirror text areas

Status
Open
Subject
Browser search fails to find some term occurences in CodeMirror text areas
Version
12.x
15.x
16.x
17.x
Category
  • Bug
Feature
Syntax highlighter (Codemirror)
Resolution status
Confirmed
Submitted by
Philippe Cloutier
Lastmod by
Philippe Cloutier
Rating
(0)
Description

Search offered by browsers (Ctrl+F) looks in text areas. So if editing a wiki page (for example), browser search should allow finding a term in the wiki page's source. Unfortunately, CodeMirror does not find terms reliably, in Tiki 17 as well as trunk (r63983).

It's not exactly clear when search works and when it doesn't, but apparently occurrences of the search term inside the visible zone will be found. Those outside will not necessarily though.

For example, searching for "Smarty templates" in https://dev.tiki.org/DevTips only finds 1 of 3 occurences if the editor is at its default positioning (top).

This affects at least Firefox 55.0.3 and Google Chrome 61.0.

I consider this a serious bug for CodeMirror.

Solution
Set viewportMargin to Infinity
Importance
6
Priority
30
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6458
Created
Wednesday 27 September, 2017 13:30:06 UTC
by Philippe Cloutier
LastModif
Tuesday 03 October, 2017 15:45:28 UTC


Show PHP error messages