# Text in CodeMirror failed to be searched by browser search (Ctrl+F)

**URL:** <https://discuss.codemirror.net/t/text-in-codemirror-failed-to-be-searched-by-browser-search-ctrl-f/1276>\
**Category:** Uncategorized\
**Created:** [June 7, 2017, 5:25am UTC](https://discuss.codemirror.net/t/text-in-codemirror-failed-to-be-searched-by-browser-search-ctrl-f/1276 "2017-06-07T05:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@Peter](https://discuss.codemirror.net/u/Peter)\
**Post date:** [June 7, 2017, 5:25am UTC](https://discuss.codemirror.net/t/text-in-codemirror-failed-to-be-searched-by-browser-search-ctrl-f/1276/1 "2017-06-07T05:25:45Z")

</div>

I got complied about this weird issue by a user who insist to use browser search instead the search functionality of CodeMirror. It does happen sometime when a text pasted to the input text box of browser search, either it say “No Match Found” but actually the searched text is existed in the CodeMirror edit or it get a wrong match amount.

However we didn’t get any trouble when input the search characters one by one to the search text input box. Is there any met the same issue or just me?

---

<div class="post-metadata">

**Author:** ![dwelle](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/dwelle/32/374_2.png) [@dwelle](https://discuss.codemirror.net/u/dwelle)\
**Post date:** [June 7, 2017, 8:10am UTC](https://discuss.codemirror.net/t/text-in-codemirror-failed-to-be-searched-by-browser-search-ctrl-f/1276/2 "2017-06-07T08:10:07Z")

</div>

Check [autoresize demo](http://codemirror.net/demo/resize.html). Technically, you might only need to set the [viewportMargin](http://codemirror.net/doc/manual.html#optioniewportMargin) to `Infinity`, but it might not be enough. Either way, expect very bad performance for \>800-1500 line documents (depends on your computer’s speed).

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)\
**Post date:** [June 7, 2017, 11:27am UTC](https://discuss.codemirror.net/t/text-in-codemirror-failed-to-be-searched-by-browser-search-ctrl-f/1276/3 "2017-06-07T11:27:20Z")

</div>

See also [this issue](https://github.com/codemirror/CodeMirror/issues/4766).
