| | |
| | | function tabCancel(ed, e) {
|
| | | if (e.keyCode === 9)
|
| | | return Event.cancel(e);
|
| | | };
|
| | | }
|
| | |
|
| | | function tabHandler(ed, e) {
|
| | | var x, i, f, el, v;
|
| | |
|
| | | function find(d) {
|
| | | el = DOM.select(':input:enabled,*[tabindex]');
|
| | | function canSelect(e) {
|
| | | return e.type != 'hidden' && |
| | | e.tabIndex != '-1' && |
| | | !(el[i].style.display == "none") && |
| | | !(el[i].style.visibility == "hidden");
|
| | | }
|
| | | el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
|
| | |
|
| | | function canSelectRecursive(e) {
|
| | | return e.nodeName==="BODY" || (e.type != 'hidden' &&
|
| | | !(e.style.display == "none") &&
|
| | | !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
|
| | | }
|
| | | function canSelectInOldIe(el) {
|
| | | return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
|
| | | }
|
| | | function isOldIe() {
|
| | | return tinymce.isIE6 || tinymce.isIE7;
|
| | | }
|
| | | function canSelect(el) {
|
| | | return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
|
| | | }
|
| | |
|
| | | each(el, function(e, i) {
|
| | | if (e.id == ed.id) {
|
| | |
| | | return false;
|
| | | }
|
| | | });
|
| | |
|
| | | if (d > 0) {
|
| | | for (i = x + 1; i < el.length; i++) {
|
| | | if (canSelect(el[i]))
|
| | |
| | | }
|
| | |
|
| | | return null;
|
| | | };
|
| | | }
|
| | |
|
| | | if (e.keyCode === 9) {
|
| | | v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
|
| | |
| | | return Event.cancel(e);
|
| | | }
|
| | | }
|
| | | };
|
| | | }
|
| | |
|
| | | ed.onKeyUp.add(tabCancel);
|
| | |
|
| | |
| | |
|
| | | // Register plugin
|
| | | tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
|
| | | })(); |
| | | })();
|