V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
thedevil7
V2EX  ›  反馈

回复快捷键 ctrl + enter

  •  
  •   thedevil7 · 2012-04-04 16:48:24 +08:00 · 4059 次点击
    这是一个创建于 4419 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如果在回复的时候能直接打完字 ctrl + enter 回复, 使用感受会不会更爽快?
    12 条回复    1970-01-01 08:00:00 +08:00
    fanzeyi
        1
    fanzeyi  
       2012-04-04 17:02:08 +08:00
    fanzeyi
        2
    fanzeyi  
       2012-04-04 17:02:32 +08:00
    第一个转义挂掉了 @Livid
    TashinV
        3
    TashinV  
       2012-04-04 17:04:52 +08:00
    tab+space
    Livid
        4
    Livid  
    MOD
       2012-04-04 17:09:04 +08:00
    @fanzeyi 多谢你发现了一个新 bug。
    thedevil7
        5
    thedevil7  
    OP
       2012-04-04 17:24:01 +08:00
    @Livid 这个问题重复提了好多次了, 不如把这个放入 V2EX 的教程贴把. 我记得最开始来 V2EX 的时候, 右边貌似有类似的东西.
    Livid
        6
    Livid  
    MOD
       2012-04-04 17:29:04 +08:00
    @thedevil7 这个问题我是有点犯拖延症。

    大家谁可以推荐一个这方面比较简洁的实现代码么?
    liyandong
        7
    liyandong  
       2012-04-04 17:53:02 +08:00
    liyandong
        8
    liyandong  
       2012-04-04 17:53:49 +08:00
    akai
        9
    akai  
       2012-04-04 21:15:07 +08:00
    $('#reply_content').keydown(function(e) {
    if ( e.ctrlKey && e.keyCode === 13 ) {
    $(this).closest('form').submit();
    }
    });
    NemoAlex
        10
    NemoAlex  
       2012-04-04 23:29:02 +08:00
    Tab then Enter 是更贴近浏览器的交互方式
    thedevil7
        11
    thedevil7  
    OP
       2012-04-04 23:44:31 +08:00
    @NemoAlex 恩, 学习了~~~
    NemoAlex
        12
    NemoAlex  
       2012-04-04 23:54:44 +08:00
    @Livid 另外说一个 issue: 像我这种宽度不足的头像,在这个页面里应该是居中会比较好吧?
    目前是居左
    在盛放头像的 td 上加入样式 text-align: center 即可
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5510 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 05:54 · PVG 13:54 · LAX 22:54 · JFK 01:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.