Last modified: 2014-04-08 08:57:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25992, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23992 - Search&replace disabled in IE8, Opera
Search&replace disabled in IE8, Opera
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikiEditor (Other open bugs)
unspecified
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Trevor Parscal
:
: 48305 (view as bug list)
Depends on:
Blocks: 63665
  Show dependency treegraph
 
Reported: 2010-06-16 07:57 UTC by Mattia
Modified: 2014-04-08 08:57 UTC (History)
9 users (show)

See Also:
Web browser: Opera
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mattia 2010-06-16 07:57:22 UTC
I opened this bug to ask for the restoration of a function belonging to the enhanced editing toolbar, not working in some browsers such as Opera and IE8. 
This is the function "find and replace", which you can also see marked with red arrows in the following image:
[http://img697.imageshack.us/img697/7231/scrrenwiki.png]
Thank you
Comment 1 Roan Kattouw 2010-06-16 10:33:29 UTC
Search&replace is disabled in these browsers because it was broken in them; I
will see if I can fix S&R for IE at least.
Comment 2 Mattia 2010-06-28 11:36:33 UTC
(In reply to comment #1)
> Search&replace is disabled in these browsers because it was broken in them; I
> will see if I can fix S&R for IE at least.

Some news about it?
Comment 3 Owltom 2011-05-07 01:34:01 UTC
The button is enbaled now, but the function is completely broken in Opera.

Example:
I tried to replace the word "Lorem" with "Kamel" and the result is this diff:

http://kamelopedia.mormo.org/index.php?title=Kamel:Nachteule/SearchReplaceBug&diff=442168&oldid=442167

Browser: Opera 11.x
MediaWiki: 1.18 r86333, 1.17wmf1 r87486
Comment 4 Krinkle 2011-06-22 00:31:45 UTC
*Mass-change: Move WikiEditor bugs to component and remove blocker bug where*
Comment 6 Andre Klapper 2013-05-10 02:32:43 UTC
Confirming for Windows XP, IE 7, 800x600px,
https://en.wikipedia.org/w/index.php?title=Louisiana_State_Archive_and_Research_Library&action=edit
on browserstack.com, not being logged in.
Same problem for Opera 12.14, not being logged in.

Works correctly in Google Chrome 24 (not logged in) and Firefox 18 (logged in).
Comment 7 Andre Klapper 2013-05-10 02:32:49 UTC
*** Bug 48305 has been marked as a duplicate of this bug. ***
Comment 8 XP1 2013-05-17 09:18:52 UTC
Did anyone else take a look at "jquery.textSelection.js"? Like I said on
2012-02-07, the bug is on line 65:

    getContents: function () {
        return this.val();
    },

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/jquery/jquery.textSelection.js#l65

In "jquery.textSelection.js", there are a few bugs with handling newlines.

For Opera, the only change required is to the `getContents` function.

There are more bugs regarding Internet Explorer. The if statements in "jquery.textSelection.js" should be reversed. You want to check for W3C way first and then fallback to Internet Explorer way.

Furthermore, the newline strings should not be hardcoded. This causes problems when the browser has a different newline than what was expected, which results in off-by-one errors.

Experiment with the following example:

    function getNewline() {
       var document = window.document;
       var textarea = document.createElement("textarea");
       textarea.value = "\n";
       return textarea.value;
    }

    var newline = getNewline();

Running in IE8 mode and Opera 11.50, 11.60:

>> newline.length
2
>> newline === "\r\n"
true
>> newline === "\n"
false

Running in IE9 mode and Opera 11.64:

>> newline.length
1
>> newline === "\r\n"
false
>> newline === "\n"
true

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links