Page MenuHomePhabricator

IE8 + javascript inserttools triggers "sure you want to leave" also fails to insert into in edit summary line
Closed, ResolvedPublic

Description

There have been reports that if IE8 users try to use the Javascript insert tools BELOW the editwindow (so not those of the edittoolbar), that they get the "Are you sure you want to leave" dialog.

English Wikipedia of course.


Version: unspecified
Severity: normal

Details

Reference
bz23570

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:05 PM
bzimport set Reference to bz23570.

The first symbol you try to insert with the JS inserttools works. It is only the 2nd and subsequent inserts that present the "are you sure you want to leave this page" dialog. The Toolbar inserttools continue to function as normal. No dialog is present before or after. The problem also does not manifest on FF or Safari.

simon wrote:

This IE-only bug is still with us as of now. Here's my synopsis:

In IE8, I can insert a single character from the insert line into the main edit window. Trying to add a second one invokes the "are you sure you want to navigate away" message. But clicking OK on this message inserts the second character. Third & greater inserts also go through the "are you sure" message but if OK'd, do turn up in the window.

With focus on the edit summary line, if I have not inserted characters into the main edit window, then nothing happens - no insertion, no message. If I have inserted a character into the main edit window, then with focus on the edit summary line, I get the "Are you sure" message and no insertion into the line.

simon wrote:

Apologies it has taken me three edits to make this clear: There are two seperate issues going on

*false triggering of the "are you sure you want to navigate away" message.

*complete inability to insert special characters into the edit summary line

Fails in IE7 and IE8.

There is another issue related to this. If you preview a page and then hit the show/hide button of a navbox for instance, you also get the "are you sure you want to navigate away"-message.

Again with IE8.

(In reply to comment #3)

Apologies it has taken me three edits to make this clear: There are two
seperate issues going on

*false triggering of the "are you sure you want to navigate away" message.

This, as well as the issue mentioned in comment #4, is caused by a bug in IE where it fires the beforeunload event even when clicking a link like <a href="javascript:doStuff()">show/hide</a>, even though clicking such a link doesn't lead to unloading the page. The solution is to avoid these javascript: links and use other click handlers in some way (in combination with href="#" and the handler returning false). A quick and dirty patch for [[en:MediaWiki:Edittools.js]] along these lines that I've confirmed works in both FF 3.6 and IE 8 can be found at http://en.wikipedia.org/w/index.php?title=User:Catrope/Edittools.js&diff=366551331&oldid=366550829 .

Short version: this is a bug in IE affecting the specific way these charinsert and show/hide links are set up. It's easy to work around by setting up these links differently.

*complete inability to insert special characters into the edit summary line

Fixed in r67526, will be deployed later today. Marking the bug as FIXED, as the other issue is an IE-specific bug that needs to be worked around locally.

edittools.js fix deployed, collapsible tables code soon to follow.

A similar fix is needed for toc collapsing in wikibits.js however. Reopening until that is fixed.

(In reply to comment #6)

edittools.js fix deployed, collapsible tables code soon to follow.

A similar fix is needed for toc collapsing in wikibits.js however. Reopening
until that is fixed.

Fixed in r67544.

simon wrote:

The "Are you sure you want to leave" prompt is not being invoked, but I cannot actually insert any special characters into the edit window or summary line, using IE8.

(In reply to comment #8)

The "Are you sure you want to leave" prompt is not being invoked, but I cannot
actually insert any special characters into the edit window or summary line,
using IE8.

The fix hasn't been deployed yet, this will happen later today.

(In reply to comment #5)

*complete inability to insert special characters into the edit summary line

Fixed in r67526, will be deployed later today. Marking the bug as FIXED, as the
other issue is an IE-specific bug that needs to be worked around locally.

(In reply to comment #9)

The "Are you sure you want to leave" prompt is not being invoked, but I cannot
actually insert any special characters into the edit window or summary line,
using IE8.

The fix hasn't been deployed yet, this will happen later today.

This is still not functioning in IE7 (7.0.6001.18000). Should it be forked to a separate bug, or is this a case of IE7 not supported so WONTFIX?

(In reply to comment #10)

This is still not functioning in IE7 (7.0.6001.18000). Should it be forked to a
separate bug, or is this a case of IE7 not supported so WONTFIX?

IE7 is supported. How exactly is it not working?

(In reply to comment #11)

(In reply to comment #10)

This is still not functioning in IE7 (7.0.6001.18000). Should it be forked to a
separate bug, or is this a case of IE7 not supported so WONTFIX?

IE7 is supported. How exactly is it not working?

Click on the edit summary (optionally also type some characters there to confirm focus), then click the en-dash tool (to be clear, this is fin the toolbox below the "Save" and "Show" buttons). The page scrolls to the top and no character is inserted. This is now also happening in the main text edit area, not just the summary field. I just tried it on a long page (http://en.wikipedia.org/wiki/Wikipedia:Requests_for_comment/May_2010_skin_change/Bug_reports#Edittools_do_not_work_in_Internet_Explorer (which see)) and a short one (http://en.wikipedia.org/wiki/User:Ningauble) with identical non-results.

Follow up change made in r68007.

Fixes now made for the edittools below the save button as well as the navbox and toc collapsing code.
All deployed. Trying to verify if this is fixed now.

Especially IE 6 and IE7 feedback is appreciated, since I don't have access to those browsers.

(In reply to comment #13)

Follow up change made in r68007.
Fixes now made for the edittools below the save button as well as the navbox
and toc collapsing code.
All deployed. Trying to verify if this is fixed now.
Especially IE 6 and IE7 feedback is appreciated, since I don't have access to
those browsers.

Worse: The tools no longer render as clickable links, just plain text; and the toolset dropdown no longer finctions, it displays all the character sets.

simon wrote:

Edittools below the save button worked fine for me in IE8 (not sure about the bouncing issue noted in IE7).

Edittools below the save button worked fine for me in IE7, although I got a little page bounce in that the browser insists that the top border of the edit window is aligned with the top border of the browser when it performs an insert.

I tested this functionality on IE6, IE7 and IE8 now.

  • There are no more "are you sure you want to leave" dialogs.
  • The text is inserted in the textarea and the editsummary

Outstanding problem:

  • At times, the page randomly "jumps". This is bug 19334

If you are still seeing problems, then this is most likely caused by one of two things:

  • You have a Gadget enabled or are running a userscript from your /vector.js that has an error and causes other scripts to fail
  • Your browser has old versions of the code cached. Please follow this information on clearing your browser cache: http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache