MyBB Community Forums

Full Version: Search error when code mirror is on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Browsers Search option is a necessary tool for designers to find their needed codes between themes and templates codes; But you can't use browsers search option (Ctrl+F) when Code Mirror is Turned on.It6 doesn't work!
This was reported during the betas, but is unfortunately a bug in CodeMirror (or a "feature" - I don't know for sure). I know it's a pain, but right now there's nothing we can do about it.
I was wondering about this myself and I found out that it actually can be fixed with a CodeMirror option: http://codemirror.net/doc/manual.html#op...portMargin But the last sentence worries me:
This will have bad effects on performance of big documents.
So I'm not sure if we should change it in core - I'm testing the speed with different stylesheets/templates and so far the delay is not noticeable on my PC, even for global.css.
Bump.

If someone wants to test it, just open admin/modules/style -> templates.php and themes.php then find all 6 instances of
lineNumbers: true,
and add this below:
viewportMargin: Infinity,

Then you'll be able to use browser's CTRL+F in templates/stylesheets. Let me know if it affect the performance in a bad way for you - I haven't noticed any problem yet.
I think we cannot notice any performance issues because templates in mybb are not huge and dont contain thousands and thousands lines
(2014-10-26, 09:24 PM)Eldenroot Wrote: [ -> ]I think we cannot notice any performance issues because templates in mybb are not huge and dont contain thousands and thousands lines

Yes, but I'm not looking for "I think", we need to be sure that noone has anything against this change. I'll wait till the next weekend, then I'll push it to github if noone has any objections.
I tested it today - no problems for me, no extra server load. As I said - templates dont contain thousands and thousand of lines.

What is your opinion? Is there anyone else from mybb team who can test it?
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/1592

Thanks for contributing to MyBB!

Regards,
The MyBB Group