Skip to content

Commit

Permalink
MAGETWO-69152: Removed workaround for old Webkit bug in the TinyMCE e…
Browse files Browse the repository at this point in the history
…ditor for selec… #9540
  • Loading branch information
Oleksii Korshenko authored May 15, 2017
2 parents 7201bc0 + 6550f87 commit a77cc1d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 19 deletions.
5 changes: 1 addition & 4 deletions lib/web/tiny_mce/classes/util/Quirks.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,8 @@
ed.onClick.add(function(ed, e) {
e = e.target;

// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
// WebKit can't even do simple things like selecting an image
// Needs tobe the setBaseAndExtend or it will fail to select floated images
if (/^(IMG|HR)$/.test(e.nodeName))
ed.selection.getSel().setBaseAndExtent(e, 0, e, 1);
ed.selection.select(e);

if (e.nodeName == 'A' && ed.dom.hasClass(e, 'mceItemAnchor'))
ed.selection.select(e);
Expand Down
2 changes: 1 addition & 1 deletion lib/web/tiny_mce/tiny_mce.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/web/tiny_mce/tiny_mce_jquery.js

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions lib/web/tiny_mce/tiny_mce_jquery_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1441,11 +1441,8 @@ tinymce.create('static tinymce.util.XHR', {
ed.onClick.add(function(ed, e) {
e = e.target;

// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
// WebKit can't even do simple things like selecting an image
// Needs tobe the setBaseAndExtend or it will fail to select floated images
if (/^(IMG|HR)$/.test(e.nodeName))
ed.selection.getSel().setBaseAndExtent(e, 0, e, 1);
ed.selection.select(e);

if (e.nodeName == 'A' && ed.dom.hasClass(e, 'mceItemAnchor'))
ed.selection.select(e);
Expand Down
2 changes: 1 addition & 1 deletion lib/web/tiny_mce/tiny_mce_prototype.js

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions lib/web/tiny_mce/tiny_mce_prototype_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1193,11 +1193,8 @@ tinymce.create('static tinymce.util.XHR', {
ed.onClick.add(function(ed, e) {
e = e.target;

// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
// WebKit can't even do simple things like selecting an image
// Needs tobe the setBaseAndExtend or it will fail to select floated images
if (/^(IMG|HR)$/.test(e.nodeName))
ed.selection.getSel().setBaseAndExtent(e, 0, e, 1);
ed.selection.select(e);

if (e.nodeName == 'A' && ed.dom.hasClass(e, 'mceItemAnchor'))
ed.selection.select(e);
Expand Down
5 changes: 1 addition & 4 deletions lib/web/tiny_mce/tiny_mce_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1166,11 +1166,8 @@ tinymce.create('static tinymce.util.XHR', {
ed.onClick.add(function(ed, e) {
e = e.target;

// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
// WebKit can't even do simple things like selecting an image
// Needs tobe the setBaseAndExtend or it will fail to select floated images
if (/^(IMG|HR)$/.test(e.nodeName))
ed.selection.getSel().setBaseAndExtent(e, 0, e, 1);
ed.selection.select(e);

if (e.nodeName == 'A' && ed.dom.hasClass(e, 'mceItemAnchor'))
ed.selection.select(e);
Expand Down

0 comments on commit a77cc1d

Please sign in to comment.