The answer is from the foreigner Http://stackoverflow.com/questions/14795035/twitter-bootstrap-modal-blocks-text-input-field
function () { $ (document). Off (' Focusin.modal ');});
This is the solution of the domestic students:
http://www.oschina.net/question/226830_143869
//Show Modal$ (' #myModal '). Modal (' show '));//execute before show finishes$ (' #myModal '). On (' shown ',function () { //Add the following sentence! Solved the ~$ (document). Off (' Focusin.modal '); //Create editor after opening dialogKindeditor.create (' textarea[name= ' content "] ', {resizetype:1 });})//execute before Hide finishes$ (' #myModal '). On (' Hidden ',function () { //Close dialog before removing the editorKindeditor.remove (' textarea[name= ' content "] ');})
Here is my application in the project, please pay attention to the annotated sentence!
functioncomputemaskheight () {varobj = $ ("#blockLoading"); varParent =obj.parent (); Obj.height (Parent.height ()); } functionblock (opt) {varDefaults ={title:"", Showclose:true, Showok:true, Showbottom:true, Showtitle:true, Showhead:true, OnOk:function() {}, Onshown:function(e) {}}; varsetting =$.extend (defaults, opt); $("#blockTitle"). HTML (setting.title); if(setting.showclose) {$ ("#closeBlock, #closeBlockX"). Show (); } Else { $("#closeBlock, #closeBlockX"). Hide (); } if(Setting.showok) {$ ("#blockOk"). Show (); } Else { $("#blockOk"). Hide (); } $("#blockOk"). Unbind (). Click (function() {Setting.onok (); }); if(Setting.showbottom) {$ ("#blockBottom"). Show (); } Else { $("#blockBottom"). Hide (); } if(Setting.showhead) {$ ("#blockHead"). Show (); } Else { $("#blockHead"). Hide (); } $("#blockBody"). HTML ("<i class= ' icon-spinner icon-spin icon-4x ' ></i>"); $(' #blockContainer '). Off (' Shown.bs.modal '). On (' Shown.bs.modal ',function(e) {$ (document). Off (' Focusin.modal ');//resolves an issue in which the editor popup text box cannot be entered Http://stackoverflow.com/questions/14795035/twitter-bootstrap-modal-blocks-text-input-fieldSetting.onshown (e); }); $("#blockContainer"). modal (); }
Bootstrap a pop-up layer text box cannot be entered when you use modal to load Kindeditor