1 | Index: _source/plugins/clipboard/plugin.js |
---|
2 | =================================================================== |
---|
3 | --- _source/plugins/clipboard/plugin.js (revision 7006) |
---|
4 | +++ _source/plugins/clipboard/plugin.js (revision ) |
---|
5 | @@ -226,7 +226,11 @@ |
---|
6 | // Wait a while and grab the pasted contents |
---|
7 | window.setTimeout( function() |
---|
8 | { |
---|
9 | - mode == 'text' && CKEDITOR.env.gecko && editor.focusGrabber.focus(); |
---|
10 | + // Gecko need to move focus back from the textarea |
---|
11 | + // to blink the cursor. (#5684) |
---|
12 | + if ( mode == 'text' && CKEDITOR.env.gecko ) |
---|
13 | + editor.document.getBody().focus(); |
---|
14 | + |
---|
15 | pastebin.remove(); |
---|
16 | editor.removeListener( 'selectionChange', cancel ); |
---|
17 | |
---|
18 | Index: _source/plugins/editingblock/plugin.js |
---|
19 | =================================================================== |
---|
20 | --- _source/plugins/editingblock/plugin.js (revision 7010) |
---|
21 | +++ _source/plugins/editingblock/plugin.js (revision ) |
---|
22 | @@ -1,0 +1,0 @@ |
---|
23 | Index: _source/plugins/wysiwygarea/plugin.js |
---|
24 | =================================================================== |
---|
25 | --- _source/plugins/wysiwygarea/plugin.js (revision 6973) |
---|
26 | +++ _source/plugins/wysiwygarea/plugin.js (revision ) |
---|
27 | @@ -703,28 +703,6 @@ |
---|
28 | } ); |
---|
29 | } |
---|
30 | |
---|
31 | - // IE standard compliant in editing frame doesn't focus the editor when |
---|
32 | - // clicking outside actual content, manually apply the focus. (#1659) |
---|
33 | - if ( editable && |
---|
34 | - CKEDITOR.env.ie && domDocument.$.compatMode == 'CSS1Compat' |
---|
35 | - || CKEDITOR.env.gecko |
---|
36 | - || CKEDITOR.env.opera ) |
---|
37 | - { |
---|
38 | - var htmlElement = domDocument.getDocumentElement(); |
---|
39 | - htmlElement.on( 'mousedown', function( evt ) |
---|
40 | - { |
---|
41 | - // Setting focus directly on editor doesn't work, we |
---|
42 | - // have to use here a temporary element to 'redirect' |
---|
43 | - // the focus. |
---|
44 | - if ( evt.data.getTarget().equals( htmlElement ) ) |
---|
45 | - { |
---|
46 | - if ( CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900 ) |
---|
47 | - blinkCursor(); |
---|
48 | - focusGrabber.focus(); |
---|
49 | - } |
---|
50 | - } ); |
---|
51 | - } |
---|
52 | - |
---|
53 | var focusTarget = CKEDITOR.env.ie ? iframe : domWindow; |
---|
54 | focusTarget.on( 'blur', function() |
---|
55 | { |
---|
56 | @@ -1205,31 +1183,6 @@ |
---|
57 | }); |
---|
58 | } |
---|
59 | |
---|
60 | - // Create an invisible element to grab focus. |
---|
61 | - if ( CKEDITOR.env.gecko || CKEDITOR.env.ie || CKEDITOR.env.opera ) |
---|
62 | - { |
---|
63 | - var focusGrabber; |
---|
64 | - editor.on( 'uiReady', function() |
---|
65 | - { |
---|
66 | - focusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml( |
---|
67 | - // Use 'span' instead of anything else to fly under the screen-reader radar. (#5049) |
---|
68 | - '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' ) ); |
---|
69 | - |
---|
70 | - focusGrabber.on( 'focus', function() |
---|
71 | - { |
---|
72 | - editor.focus(); |
---|
73 | - } ); |
---|
74 | - |
---|
75 | - editor.focusGrabber = focusGrabber; |
---|
76 | - } ); |
---|
77 | - editor.on( 'destroy', function() |
---|
78 | - { |
---|
79 | - CKEDITOR.tools.removeFunction( contentDomReadyHandler ); |
---|
80 | - focusGrabber.clearCustomData(); |
---|
81 | - delete editor.focusGrabber; |
---|
82 | - } ); |
---|
83 | - } |
---|
84 | - |
---|
85 | // Disable form elements editing mode provided by some browers. (#5746) |
---|
86 | editor.on( 'insertElement', function ( evt ) |
---|
87 | { |
---|
88 | Index: _source/plugins/selection/plugin.js |
---|
89 | =================================================================== |
---|
90 | --- _source/plugins/selection/plugin.js (revision 6993) |
---|
91 | +++ _source/plugins/selection/plugin.js (revision ) |
---|
92 | @@ -341,20 +341,6 @@ |
---|
93 | restoreEnabled = 1; |
---|
94 | }); |
---|
95 | |
---|
96 | - // In IE6/7 the blinking cursor appears, but contents are |
---|
97 | - // not editable. (#5634) |
---|
98 | - if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.version < 8 || CKEDITOR.env.quirks ) ) |
---|
99 | - { |
---|
100 | - // The 'click' event is not fired when clicking the |
---|
101 | - // scrollbars, so we can use it to check whether |
---|
102 | - // the empty space following <body> has been clicked. |
---|
103 | - html.on( 'click', function( evt ) |
---|
104 | - { |
---|
105 | - if ( evt.data.getTarget().getName() == 'html' ) |
---|
106 | - editor.getSelection().getRanges()[ 0 ].select(); |
---|
107 | - }); |
---|
108 | - } |
---|
109 | - |
---|
110 | var scroll; |
---|
111 | // IE fires the "selectionchange" event when clicking |
---|
112 | // inside a selection. We don't want to capture that. |
---|
113 | @@ -399,7 +385,47 @@ |
---|
114 | saveSelection(); |
---|
115 | }); |
---|
116 | |
---|
117 | + if ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) |
---|
118 | + { |
---|
119 | + html.$.unselectable = 'on'; |
---|
120 | + // The 'click' event is not fired when clicking the |
---|
121 | + // scrollbars, so we can use it to check whether |
---|
122 | + // the empty space following <body> has been clicked. |
---|
123 | + html.on( 'click', function( evt ) |
---|
124 | + { |
---|
125 | + if ( evt.data.getTarget().getName() != 'html' || editor.focusManager.hasFocus ) |
---|
126 | + return; |
---|
127 | |
---|
128 | + editor.focus(); |
---|
129 | + |
---|
130 | + // Manually trigger range restore. |
---|
131 | + if ( savedRange ) |
---|
132 | + body.focus(); |
---|
133 | + // Without a selection, the cursor blinks, but contents are not editable. (#5634) |
---|
134 | + else |
---|
135 | + editor.getSelection().getRanges()[ 0 ].select(); |
---|
136 | + }); |
---|
137 | + } |
---|
138 | + |
---|
139 | + |
---|
140 | + if ( CKEDITOR.env.ie8 ) |
---|
141 | + { |
---|
142 | + // When content doc is in standards mode, IE doesn't focus the editor when |
---|
143 | + // clicking on outside body (on html element) content, manually apply the |
---|
144 | + // selection helps. (#1659, #7932) |
---|
145 | + html.on( 'mouseup', function( evt ) |
---|
146 | + { |
---|
147 | + if ( evt.data.getTarget().getName() == 'html' ) |
---|
148 | + { |
---|
149 | + var sel = CKEDITOR.document.$.selection, |
---|
150 | + range = sel.createRange(); |
---|
151 | + // The selection range is reported on host, but actually it should applies to the content doc. |
---|
152 | + if ( sel.type != 'None' && range.parentElement().ownerDocument == doc.$ ) |
---|
153 | + range.select(); |
---|
154 | + } |
---|
155 | + } ); |
---|
156 | + } |
---|
157 | + |
---|
158 | // IE is the only to provide the "selectionchange" |
---|
159 | // event. |
---|
160 | doc.on( 'selectionchange', saveSelection ); |
---|