We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
click Ctrl-S,能alert,但同时浏览器也弹出保存对话框。
Ctrl-S
The text was updated successfully, but these errors were encountered:
能说具体是什么样的场景下出现你说的那种情况?KeyMap是在CodeMirror onfocus时才有效。
Sorry, something went wrong.
输入焦点在编辑框时,测试了firefox和IE,都会弹出浏览器默认保存。 用了kodExplorer,里面的编辑框onfocus保存时就不会弹出浏览器默认Ctrl-S。 这是editor.md测试代码:
var keyMap = { 'Ctrl-S': function(cm){ alert('ctrl+s'); } }; testEditor.addKeyMap(keyMap);
@byhgj 经测试,确实在FF无法阻止默认的保存动作(IE不会),即使加上return false;,暂时无解,有待修正。
return false;
No branches or pull requests
click
Ctrl-S
,能alert,但同时浏览器也弹出保存对话框。The text was updated successfully, but these errors were encountered: