228 | | // Set the IFrame focus, so the blur event gets fired. |
229 | | CKEDITOR.tools.setTimeout( function() |
230 | | { |
231 | | if ( definition.voiceLabel ) |
232 | | { |
233 | | if ( CKEDITOR.env.gecko ) |
234 | | { |
235 | | var container = iframe.getParent(); |
236 | | container.setAttribute( 'role', 'region' ); |
237 | | container.setAttribute( 'title', definition.voiceLabel ); |
238 | | iframe.setAttribute( 'role', 'region' ); |
239 | | iframe.setAttribute( 'title', ' ' ); |
240 | | } |
241 | | } |
242 | | |
243 | | iframe.$.contentWindow.focus(); |
| 218 | var panelElement = panel.element, |
| 219 | panelWindow = panelElement.getWindow(), |
| 220 | windowScroll = panelWindow.getScrollPosition(), |
| 221 | viewportSize = panelWindow.getViewPaneSize(), |
| 222 | panelSize = |
| 223 | { |
| 224 | 'height' : panelElement.$.offsetHeight, |
| 225 | 'width' : panelElement.$.offsetWidth |
| 226 | }; |
| 227 | |
| 228 | // If the menu is horizontal off, shift it toward |
| 229 | // the opposite language direction. |
| 230 | if ( rtl ? left < 0 : left + panelSize.width > viewportSize.width + windowScroll.x ) |
| 231 | left += ( panelSize.width * ( rtl ? 1 : -1 ) ); |
| 232 | |
| 233 | // Vertical off screen is simpler. |
| 234 | if( top + panelSize.height > viewportSize.height + windowScroll.y ) |
| 235 | top -= panelSize.height; |
| 236 | |
| 237 | element.setStyles( |
| 238 | { |
| 239 | top : top + 'px', |
| 240 | left : left + 'px', |
| 241 | visibility : '', |
| 242 | opacity : '1' // FF3 is ignoring "visibility" |
| 243 | } ); |
| 244 | |
| 245 | isShowing = false; |
| 246 | |
| 247 | // Set the panel frame focus, so the blur event gets fired. |
| 248 | CKEDITOR.tools.setTimeout( function() |
| 249 | { |
| 250 | if ( definition.voiceLabel ) |
| 251 | { |
| 252 | if ( CKEDITOR.env.gecko ) |
| 253 | { |
| 254 | var container = iframe.getParent(); |
| 255 | container.setAttribute( 'role', 'region' ); |
| 256 | container.setAttribute( 'title', definition.voiceLabel ); |
| 257 | iframe.setAttribute( 'role', 'region' ); |
| 258 | iframe.setAttribute( 'title', ' ' ); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | iframe.$.contentWindow.focus(); |