editor tabIndex

This commit is contained in:
life
2014-05-13 16:47:06 +08:00
parent 077e702ba1
commit 418c70bad2
5 changed files with 27 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -270,15 +270,33 @@ ajaxPostJson(
*/
//-----------------
// 切换编辑器时要修改tabIndex
function editorIframeTabindex(index) {
var $i = $("#editorContent_ifr");
if($i.size() == 0) {
setTimeout(function() {
editorIframeTabindex(index);
}, 100);
} else {
$i.attr("tabindex", index);
}
}
//切换编辑器
function switchEditor(isMarkdown) {
// 富文本永远是2
if(!isMarkdown) {
$("#editor").show();
$("#mdEditor").css("z-index", 1);
// 刚开始没有
editorIframeTabindex(2);
$("#wmd-input").attr("tabindex", 3);
} else {
$("#mdEditor").css("z-index", 3).show();
editorIframeTabindex(3);
$("#wmd-input").attr("tabindex", 2);
}
}