There's a bug in insertTags() function causing Opera 9.5x select wrong text when inserted text contains newline characters.
Example:
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png", "speedTip": "FooBar", // <nowiki> "tagOpen": "foo foo(", "tagClose": ")bar\nbar\nbar\nbar", "sampleText": "baz baz"};
This bug causes problem on Wiktionary, as buttons inserting multi-line text are in common use there (nearly on every edit creating a new page).
Suggested solution:
Remove
if (window.opera)
tagClose = tagClose.replace(/\n/g,'');
(terrible browser sniffing BTW) - this helps on Opera 9.5, don't know how it's with previous persions, but I remember the problem with insertTags() at least since the very beginning of Opera 9.x versions. Alternatively, your can change browser sniffing to:
if (is_opera && is_opera_seven)
or something like this. Or, the best way, remove the browser sniffing completely:
http://dev.opera.com/articles/view/a-browser-sniffing-warning-the-trouble/
Version: unspecified
Severity: normal