Last modified: 2012-12-14 10:22:38 UTC
(I think this is also reported in bugs 22358 and 22816, but these aren't maintained anymore and are really crowded) The "find" routine of "Search&Replace" does not work as expected in Opera and therefore "replace" doesn't work either. The problem are line breaks: When getting the text from the textarea, all \r are removed, so every line break is only one character (\n). When setting the text selection (selectionStart/selectionEnd) Opera counts the line breaks as two characters (\r\n). Example: A\r\n B If you want to select "B", the text of the textarea is loaded, but then the \r is removed: "A\nB", so selectionStart=2 and selectionEnd=3. If applied to the above text, the following result is shown (selection in []): A\r[\n] B The \n is selected instead of the B. The problem is inside "jquery,mediawiki". The function "val" on line 2143 is used to get the content of the textarea. I don't know why, but on line 2159 not "ret" is returned, but "ret.replace(rreturn, "")", which removes the \r. I really don't know why this is done. Firefox+Chrome don't contain any \r in textareas, so removing the replacement should work in Opera - but of course I don't know which functions also rely on this "val" function.
Works for me now.
Thanks for updating the ticket, and sorry that nobody took a look at it before. :-/