This commit is contained in:
Galen Wolfe-Pauly 2015-03-24 17:36:45 -07:00
parent f730f93d4a
commit 132872f5e1
2 changed files with 15 additions and 5 deletions

View File

@ -52,7 +52,10 @@ module.exports = recl
@set()
@typing false
_keyDown: (e) ->
_audiKeyDown: (e) ->
if e.keyCode is 13 then $('#writing').focus()
_writingKeyDown: (e) ->
if e.keyCode is 13
e.preventDefault()
@sendMessage()
@ -162,6 +165,7 @@ module.exports = recl
id:"audi"
className:"audi valid-#{@state.valid}"
contentEditable:true
onKeyDown: @_audiKeyDown
onBlur:@_setAudi
}, audi.join(" "))
(Member iden, "")
@ -174,7 +178,7 @@ module.exports = recl
onBlur: @_blur
onInput: @_input
onPaste: @_input
onKeyDown: @_keyDown
onKeyDown: @_writingKeyDown
onFocus: @cursorAtEnd
}, "")
div {id:"length"}, "0/69"

View File

@ -615,7 +615,12 @@ module.exports = recl({
this.set();
return this.typing(false);
},
_keyDown: function(e) {
_audiKeyDown: function(e) {
if (e.keyCode === 13) {
return $('#writing').focus();
}
},
_writingKeyDown: function(e) {
if (e.keyCode === 13) {
e.preventDefault();
this.sendMessage();
@ -753,6 +758,7 @@ module.exports = recl({
id: "audi",
className: "audi valid-" + this.state.valid,
contentEditable: true,
onKeyDown: this._audiKeyDown,
onBlur: this._setAudi
}, audi.join(" ")), Member(iden, ""), div({
className: "time"
@ -764,7 +770,7 @@ module.exports = recl({
onBlur: this._blur,
onInput: this._input,
onPaste: this._input,
onKeyDown: this._keyDown,
onKeyDown: this._writingKeyDown,
onFocus: this.cursorAtEnd
}, ""), div({
id: "length"
@ -1249,7 +1255,7 @@ var invariant = function(condition, format, a, b, c, d, e, f) {
module.exports = invariant;
},{}],"/Users/galen/src/urbit/urb/zod/main/pub/talk/src/js/node_modules/moment-timezone/data/packed/latest.json":[function(require,module,exports){
module.exports=module.exports=module.exports=module.exports={
module.exports=module.exports=module.exports=module.exports=module.exports=module.exports=module.exports={
"version": "2014j",
"zones": [
"Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q",