X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpanel%2Fplugin.js;h=c7c6adb5dea676c2eb7e95d580310655ba0efc27;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=181fae33796fa2973ece54df9d8e2724f3d47040;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/panel/plugin.js b/_source/plugins/panel/plugin.js index 181fae3..c7c6adb 100644 --- a/_source/plugins/panel/plugin.js +++ b/_source/plugins/panel/plugin.js @@ -192,6 +192,7 @@ CKEDITOR.ui.panel.prototype = this ); holder = doc.getBody(); + holder.unselectable(); } else holder = this.document.getById( 'cke_' + this.id ); @@ -227,6 +228,9 @@ CKEDITOR.ui.panel.prototype = this.document.getById( 'cke_' + this.id + '_frame' ) : this._.holder; + // Disable context menu for block panel. + holder.getParent().getParent().disableContextMenu(); + if ( current ) { // Clean up the current block's effects on holder. @@ -244,6 +248,16 @@ CKEDITOR.ui.panel.prototype = this._.onKeyDown = block.onKeyDown && CKEDITOR.tools.bind( block.onKeyDown, block ); + block.onMark = function( item ) + { + holder.setAttribute( 'aria-activedescendant', item.getId() + '_option' ); + }; + + block.onUnmark = function() + { + holder.removeAttribute( 'aria-activedescendant' ); + }; + block.show(); return block; @@ -278,6 +292,9 @@ CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass( if ( blockDefinition ) CKEDITOR.tools.extend( this, blockDefinition ); + if ( !this.attributes.title ) + this.attributes.title = this.attributes[ 'aria-label' ]; + this.keys = {}; this._.focusIndex = -1; @@ -303,6 +320,8 @@ CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass( if ( CKEDITOR.env.webkit ) item.getDocument().getWindow().focus(); item.focus(); + + this.onMark && this.onMark( item ); } },