CodeMirror: Search/Replace Demo exhibits problem seen on Wikipedia

Hi. I have encountered some bugs with the Wikipedia (via Mediawiki) embedding of codemirror (accessed by Edit Source and selecting Syntax option). One of the bugs is also present in the search and replace demo:

  1. Open the demo CodeMirror: Search/Replace Demo
  2. Click into the editor to focus
  3. Alt-F to get a persistent search dialog
  4. enter “dl” to try to find the dl at the end of the doc: works
  5. enter “Enter” key to try to find the dl at the beginning of the doc: fail.

The fail case finds the dl it it is underneath the search dialog. In the Demo you can kinda see both the dialog and the dl. In the equivalent case on wikipedia, the find hit is hidden. (⚓ T441556 Codemirror on MacBook fails to position content on Find hits)

I assume that a more complete implementation than the Demo does not have this problem, but anyone knows what makes the completion work perhaps I can relay the info to MediaWiki developers.

Thanks

jjb

Version 6 has a much better implementation of the search panel. It’s been stable for over 4 years, so I’d say the way forward for any project still using 5.x but running into issues with it would be to upgrade.