WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#25281 closed defect (bug) (fixed)

Unable to add links in WP Editor when using IE 11

Reported by: kip kniskern Owned by: azaozz
Milestone: 3.7 Priority: high
Severity: critical Version:
Component: TinyMCE Keywords: needs-testing
Focuses: Cc:
PR Number:

Description

Using Internet Explorer 11, adding a link via the "chain" icon in the WP Editor does not work. The dialog box opens, and I can enter the url, but it does not save.
The functionality works fine in lte IE 10, and also in Firefox and Chrome.
My take is that this is a bug of IE 11 and not WordPress, but I have been asked to report it here, and so I am.
The bug is with both IE 11 Preview and also IE 11 "RTM", which was just made available on MSDN yesterday.
It also occurs both on WP 3.6 and WP 3.52, and on multiple installations.
It occurs on a clean new installation with no plugins installed

Attachments (4)

25281.patch (463.5 KB) - added by azaozz 6 years ago.
25281.2.patch (463.6 KB) - added by azaozz 6 years ago.
25281.3.patch (466.7 KB) - added by azaozz 6 years ago.
25281.4.patch (466.7 KB) - added by azaozz 6 years ago.

Download all attachments as: .zip

Change History (16)

#1 @SergeyBiryukov
6 years ago

  • Component changed from General to TinyMCE
  • Keywords IE 11 Internet Exporer 11 removed

#2 @Kip Kniskern
6 years ago

A bit of further testing:

  1. In "visual" mode, selecting text, opening the popup, inserting a link, and committing results in the hyperlink being added to the very beginning of the post, without any linked text. In other words, no matter where the text you select is located in the post, the editor adds (again, only in IE 11) <a href="some link"></a> to the top of the post, inline with the first paragraph.
  1. In "text" mode, the link is added correctly

#3 @SergeyBiryukov
6 years ago

#25472 was marked as a duplicate.

#4 @azaozz
6 years ago

  • Milestone changed from Awaiting Review to 3.7
  • Version 3.6 deleted

Confirmed on Win7/IE11 release preview ver: 11.0.9600.16384. The problem is IE11 doesn't behave "like a typical IE" any more, even the user agent string doesn't mention MSIE. TinyMCE 3.x doesn't detect IE11 as IE which works in most cases (it actually crashes if all older IE normalization and hacks are applied).

One exception is that the editor iframe in IE11 still looses the selection and caret position when elements outside of the iframe are focused, so it still needs to "store the selection" before the iframe is blurred and restore it before manipulating the content of the iframe. That results in loosing the selected text and position when inserting links, inserting images at the top instead of the last caret position, etc.

There's no quick fix for this. Cannot set tinymce.isIE to true as this breaks TinyMCE 3.x in IE11. Been looking through the changes in TinyMCE 4.0 to see if we can back-port some parts.

@azaozz
6 years ago

#5 @azaozz
6 years ago

  • Keywords needs-testing added
  • Priority changed from normal to high
  • Severity changed from normal to critical

In 25281.patch: add support for IE11 to TinyMCE 3.5.

#6 @azaozz
6 years ago

Did more testing, also ran all the tests that come with TinyMCE (both qunit and java based). A few of the tests still fail in IE11: pressing Enter at the top of new post doesn't show the newly created paragraph (need to go to Text and back to Visual to show it), navigating with arrow keys inside a table, bottom to top row, etc. doesn't work. However the fail tests don't seem critical.

#7 @dd32
6 years ago

Attachment 25281.patch​ added

Just tested that with SCRIPT_DEBUG turned on with @pbearne and it seems to work for us, but like azaozz says, there's a bunch of other failing issues around it.

@azaozz
6 years ago

#8 @azaozz
6 years ago

In 25281.2.patch: fix focusing the editor in IE11. Apparently IE11 throws 'Incorrect function' when trying to do body.setActive(). Fixes opening the DFW.

@azaozz
6 years ago

#9 @azaozz
6 years ago

In 25281.3.patch: Merged the changes from Spocke https://github.com/tinymce/tinymce/commit/cd01160b037cab69c2f45866d9443e09851cf839 and fixed errors in our custom plugins.

@azaozz
6 years ago

#10 @azaozz
6 years ago

In 25281.4.patch:

  • Merge the latest changes from the TinyMCE 3.x branch.
  • Further reduce calls to tinyMCEPopup.restoreSelection() in IE by using directly editor.execCommant() instead of tinyMCEPopup.execCommant().
  • Remove the deprecated execCommand("mceBeginUndoLevel");.

#11 @azaozz
6 years ago

In 25748:

TinyMCE: add support for IE11.

  • Add the latest changes from the 3.x branch upstream.
  • Reduce the number of calls to tinyMCEPopup.restoreSelection() in our custom plugins.
  • Remove the deprecated execCommand("mceBeginUndoLevel");.

See #25281.

#12 @azaozz
6 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 25761:

Upgrade TinyMCE to 3.5.9. Fix the css for the original 'fullscreen' plugin (not enabled by default).
Fixes #25561, fixes #25281.

Note: See TracTickets for help on using tickets.