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

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?

Check autoresize demo. Technically, you might only need to set the viewportMargin 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).

See also this issue.