Index: CKEditor/releases/stable/plugins/smiley/dialogs/smiley.js
===================================================================
--- CKEditor/releases/stable/plugins/smiley/dialogs/smiley.js	(revision 4887)
+++ CKEditor/releases/stable/plugins/smiley/dialogs/smiley.js	(revision 5194)
@@ -4,4 +4,4 @@
 */
 
-CKEDITOR.dialog.add('smiley',function(a){var b=a.config,c=b.smiley_images,d=8,e,f,g=function(k){var l=k.data.getTarget(),m=l.getName();if(m=='td')l=l.getChild([0,0]);else if(m=='a')l=l.getChild(0);else if(m!='img')return;var n=l.getAttribute('cke_src'),o=l.getAttribute('title'),p=a.document.createElement('img',{attributes:{src:n,_cke_saved_src:n,title:o,alt:o}});a.insertElement(p);f.hide();},h=CKEDITOR.tools.addFunction(function(k,l){k=new CKEDITOR.dom.event(k);l=new CKEDITOR.dom.element(l);var m,n,o=k.getKeystroke();switch(o){case 39:if(m=l.getParent().getNext()){n=m.getChild(0);n.focus();}k.preventDefault();break;case 37:if(m=l.getParent().getPrevious()){n=m.getChild(0);n.focus();}k.preventDefault();break;case 38:if(m=l.getParent().getParent().getPrevious()){n=m.getChild([l.getParent().getIndex(),0]);n.focus();}k.preventDefault();break;case 40:if(m=l.getParent().getParent().getNext()){n=m.getChild([l.getParent().getIndex(),0]);if(n)n.focus();}k.preventDefault();break;case 32:g({data:k});k.preventDefault();break;case 9:if(m=l.getParent().getNext()){n=m.getChild(0);n.focus();k.preventDefault(true);}else if(m=l.getParent().getParent().getNext()){n=m.getChild([0,0]);if(n)n.focus();k.preventDefault(true);}break;case CKEDITOR.SHIFT+9:if(m=l.getParent().getPrevious()){n=m.getChild(0);n.focus();k.preventDefault(true);}else if(m=l.getParent().getParent().getPrevious()){n=m.getLast().getChild(0);n.focus();k.preventDefault(true);}break;default:return;}}),i=['<table cellspacing="2" cellpadding="2"',CKEDITOR.env.ie&&CKEDITOR.env.quirks?' style="position:absolute;"':'','><tbody>'];for(e=0;e<c.length;e++){if(e%d===0)i.push('<tr>');i.push('<td class="cke_dark_background cke_hand cke_centered" style="vertical-align: middle;"><a href="javascript:void(0)" class="cke_smile" tabindex="-1" onkeydown="CKEDITOR.tools.callFunction( ',h,', event, this );">','<img class="hand" title="',b.smiley_descriptions[e],'" cke_src="',CKEDITOR.tools.htmlEncode(b.smiley_path+c[e]),'" alt="',b.smiley_descriptions[e],'"',' src="',CKEDITOR.tools.htmlEncode(b.smiley_path+c[e]),'"',CKEDITOR.env.ie?" onload=\"this.setAttribute('width', 2); this.removeAttribute('width');\" ":'','></a>','</td>');if(e%d==d-1)i.push('</tr>');}if(e<d-1){for(;e<d-1;e++)i.push('<td></td>');i.push('</tr>');}i.push('</tbody></table>');var j={type:'html',html:i.join(''),onLoad:function(k){f=k.sender;},focus:function(){var k=this.getElement().getChild([0,0,0,0]);k.focus();},onClick:g,style:'width: 100%; height: 100%; border-collapse: separate;'};
-return{title:a.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:'tab1',label:'',title:'',expand:true,padding:0,elements:[j]}],buttons:[CKEDITOR.dialog.cancelButton]};});
+CKEDITOR.dialog.add('smiley',function(a){var b=a.config,c=a.lang.smiley,d=b.smiley_images,e=8,f,g,h=function(m){var n=m.data.getTarget(),o=n.getName();if(o=='td')n=n.getChild([0,0]);else if(o=='a')n=n.getChild(0);else if(o!='img')return;var p=n.getAttribute('cke_src'),q=n.getAttribute('title'),r=a.document.createElement('img',{attributes:{src:p,_cke_saved_src:p,title:q,alt:q}});a.insertElement(r);g.hide();m.data.preventDefault();},i=CKEDITOR.tools.addFunction(function(m,n){m=new CKEDITOR.dom.event(m);n=new CKEDITOR.dom.element(n);var o,p,q=m.getKeystroke();switch(q){case 38:if(o=n.getParent().getParent().getPrevious()){p=o.getChild([n.getParent().getIndex(),0]);p.focus();}m.preventDefault();break;case 40:if(o=n.getParent().getParent().getNext()){p=o.getChild([n.getParent().getIndex(),0]);if(p)p.focus();}m.preventDefault();break;case 32:h({data:m});m.preventDefault();break;case 39:case 9:if(o=n.getParent().getNext()){p=o.getChild(0);p.focus();m.preventDefault(true);}else if(o=n.getParent().getParent().getNext()){p=o.getChild([0,0]);if(p)p.focus();m.preventDefault(true);}break;case 37:case CKEDITOR.SHIFT+9:if(o=n.getParent().getPrevious()){p=o.getChild(0);p.focus();m.preventDefault(true);}else if(o=n.getParent().getParent().getPrevious()){p=o.getLast().getChild(0);p.focus();m.preventDefault(true);}break;default:return;}}),j=['<div><span id="smiley_emtions_label" class="cke_voice_label">'+a.lang.common.options+'</span>','<table role="listbox" aria-labelledby="smiley_emtions_label" style="width:100%;height:100%" cellspacing="2" cellpadding="2"',CKEDITOR.env.ie&&CKEDITOR.env.quirks?' style="position:absolute;"':'','><tbody>'],k=d.length;for(f=0;f<k;f++){if(f%e===0)j.push('<tr>');j.push('<td class="cke_dark_background cke_hand cke_centered" style="vertical-align: middle;"><a href="javascript:void(0)" role="option"',' aria-posinset="'+(f+1)+'"',' aria-setsize="'+k+'"',' aria-labelledby="cke_smile_label_'+f+'"',' class="cke_smile" tabindex="-1" onkeydown="CKEDITOR.tools.callFunction( ',i,', event, this );">','<img class="hand" title="',b.smiley_descriptions[f],'" cke_src="',CKEDITOR.tools.htmlEncode(b.smiley_path+d[f]),'" alt="',b.smiley_descriptions[f],'"',' src="',CKEDITOR.tools.htmlEncode(b.smiley_path+d[f]),'"',CKEDITOR.env.ie?" onload=\"this.setAttribute('width', 2); this.removeAttribute('width');\" ":'','><span id="cke_smile_label_'+f+'" class="cke_voice_label">'+b.smiley_descriptions[f]+'</span>'+'</a>','</td>');if(f%e==e-1)j.push('</tr>');}if(f<e-1){for(;f<e-1;
+f++)j.push('<td></td>');j.push('</tr>');}j.push('</tbody></table></div>');var l={type:'html',html:j.join(''),onLoad:function(m){g=m.sender;},focus:function(){var m=this.getElement().getElementsByTag('a').getItem(0);m.focus();},onClick:h,style:'width: 100%; height: 100%; border-collapse: separate;'};return{title:a.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:'tab1',label:'',title:'',expand:true,padding:0,elements:[l]}],buttons:[CKEDITOR.dialog.cancelButton]};});
