Fixes for autosizing textareas

This commit is contained in:
Alan Friedman 2016-01-15 22:29:58 -05:00
parent b42f459cee
commit a06570aebf

View File

@ -317,7 +317,10 @@ $(function() {
} }
updateKeyVal(key); updateKeyVal(key);
$('textarea.share-text').val("Let's chat on darkwire.io at https://darkwire.io" + roomId + " using the key " + encryptionKey); $('.modal').on('shown.bs.modal', function (e) {
autosize.update($('textarea.share-text'));
});
}); });
// Whenever the server emits 'new message', update the chat body // Whenever the server emits 'new message', update the chat body
@ -466,6 +469,8 @@ $(function() {
$('.key').val(val); $('.key').val(val);
$('.key').text(val); $('.key').text(val);
encryptionKey = val; encryptionKey = val;
$('textarea.share-text').val("Let's chat on darkwire.io at https://darkwire.io" + roomId + " using the key " + encryptionKey);
autosize.update($('textarea.share-text'));
} }
// Prevent closing join-modal // Prevent closing join-modal
@ -538,7 +543,7 @@ $(function() {
$('.navbar-toggle:visible').click(); $('.navbar-toggle:visible').click();
}); });
autosize($('textarea')); autosize($('textarea.share-text'));
$('textarea.share-text').click(function() { $('textarea.share-text').click(function() {
$(this).focus(); $(this).focus();