Skip to content

Commit

Permalink
Code style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Jasiun authored and Reinmar committed May 12, 2014
1 parent 2e2785d commit 331b911
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions plugins/floatpanel/plugin.js
Expand Up @@ -83,7 +83,7 @@ CKEDITOR.plugins.add( 'floatpanel', {

// Window resize doesn't cause hide on blur. (#9800)
// [iOS] Poping up keyboard triggers window resize
// which leads to undesired panel hides
// which leads to undesired panel hides.
if ( !CKEDITOR.env.iOS )
doc.getWindow().on( 'resize', hide );

Expand Down Expand Up @@ -209,8 +209,8 @@ CKEDITOR.plugins.add( 'floatpanel', {
return;

if ( this.visible && !this._.activeChild && !this._.hideTimeout ) {
// [iOS] Allow hide to be prevented if touch is bound
// to any parent of the iframe blur happens before touch
// [iOS] Allow hide to be prevented if touch is bound
// to any parent of the iframe blur happens before touch (#10714).
this._.hideTimeout = CKEDITOR.tools.setTimeout( function() {
// Panel close is caused by user's navigating away the focus, e.g. click outside the panel.
// DO NOT restore focus in this case.
Expand All @@ -227,20 +227,20 @@ CKEDITOR.plugins.add( 'floatpanel', {
}, this );

// [iOS] if touch is bound to any parent of the iframe blur
// happens twice before touchstart and before touchend
// happens twice before touchstart and before touchend (#10714).
if ( CKEDITOR.env.iOS ) {
// Prevent false hiding on blur
// We don't need to return focus here cuz touchend will fire anyway
// If user scrolls and pointer gets out of the panel area touchend will also fire
// Prevent false hiding on blur.
// We don't need to return focus here because touchend will fire anyway.
// If user scrolls and pointer gets out of the panel area touchend will also fire.
focused.on( 'touchstart', function() {
clearInterval( this._.hideTimeout );
}, this);
}, this );

// Set focus back to handle blur and hide panel when needed
// Set focus back to handle blur and hide panel when needed.
focused.on( 'touchend', function() {
this._.hideTimeout = 0;
this.focus();
}, this);
}, this );
}

CKEDITOR.event.useCapture = false;
Expand Down
2 changes: 1 addition & 1 deletion plugins/wysiwygarea/plugin.js
Expand Up @@ -289,7 +289,7 @@

if ( CKEDITOR.env.iOS ) {
// [iOS] If touch is bound to any parent of the iframe blur happens on any touch
// event and body becomes the focused element
// event and body becomes the focused element (#10714).
this.attachListener( doc, 'touchend', function() {
win.focus();
} );
Expand Down

0 comments on commit 331b911

Please sign in to comment.