Another try at fixing tabbing into the compose box, Trac #1245.

Hopefully this time with fewer stack overflows. It sets the flag
that will break the cycle *before* triggering another focus event.

(imported from commit 5e3ed74f1eeab8a18e36525ae7c8f1f1c756eb58)
This commit is contained in:
Kevin Mehall 2013-06-13 17:48:55 -04:00
parent 501a58c8f9
commit e80d1f4ad0
1 changed files with 3 additions and 2 deletions

View File

@ -206,6 +206,8 @@ exports.start = function (msg_type, opts) {
focus_area = 'new_message_content';
}
is_composing_message = msg_type;
if (msg_type === 'stream') {
show('stream', $("#" + (focus_area || 'stream')));
} else {
@ -216,7 +218,6 @@ exports.start = function (msg_type, opts) {
do_fade(opts.replying_to_message, msg_type);
}
is_composing_message = msg_type;
exports.decorate_stream_bar(opts.stream);
$(document).trigger($.Event('compose_started.zephyr', opts));
};
@ -566,7 +567,7 @@ exports.validate = function () {
$(function () {
$("#new_message_content").autosize();
$("#new_message_content").click(function (e) {
$("#new_message_content").focus(function (e) {
// If we click in the composebox, start up a new message
if (!compose.composing()) {
respond_to_sent_message = true;