[Koha-bugs] [Bug 24025] Make CodeMirror content searchable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 15 16:42:29 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24025

--- Comment #3 from George Williams (NEKLS) <george at nekls.org> ---
Owen,

If you're in 18.05 and you go to preferences.pl?tab=opac and hit the "Click to
edit" link for OPACUserJS and then search for a word that appears in the       
 textarea for #pref_OPACUserJS using the browser's built in "Find in this
page..." feature, Firefox will search all of #pref_OPACUserJS - even if the
text you're searching for is not visible on the page.  When you hit "Click to
edit" you get about 16 lines of OPACUserJS on the screen, but if you've got 500
lines in OPACUserJS and the text your searching for is on line 300, "Find in
this page..." will scroll you down to line 300.

If you're in 19.05 and follow these same steps, when you "Click to edit" you're
no longer opening the textarea for #pref_OPACUserJS.  The Code Mirror input
area is a div styled as .CodeMirror.cm-s-default.CodeMirror-wrap and when you
hit "Click to edit" you will get about 18 lines of OPACUserJS and only those 18
lines are searchable using "Find in this page...".

Code Mirror has two searh addons (search.js and searchcursor.js) that could be
added that would allow users to put the cursor in the Code Mirror div, type
CTRL-F and search through all lines in the Code Mirror div.  I think those
addons would be a good addition to Koha.

George

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list