Fix chat buttons height on Firefox

Also adapt those buttons height to the size of the textarea
master
Daniel Berteaud 11 years ago
parent 5185018da9
commit 4c53aa5117
  1. 7
      public/js/vroom.js
  2. 2
      templates/default/join.html.ep

@ -1827,6 +1827,10 @@ function initVroom(room) {
}
});
// Fix height in Firefox
if ($.browser.mozilla){
$('#saveChat,#sendChat').css('height', '47px');
}
// Adapt the chat input (textarea) size
$('#chatBox').on('input', function(){
var h = parseInt($(this).css('height'));
@ -1851,6 +1855,8 @@ function initVroom(room) {
}
}
}
// In any case, adapt height of the buttons
$('#saveChat,#sendChat').css('height', $(this).css('height'));
});
// Chat: send to other peers
$('#chatForm').submit(function (e){
@ -1861,6 +1867,7 @@ function initVroom(room) {
newChatMessage('local',$('#chatBox').val());
// reset the input box
$('#chatBox').val('').prop('rows', 1);
$('#saveChat,#sendChat').css('height', $('#chatBox').css('height'));
}
});

@ -711,7 +711,7 @@
<div class="input-group">
<textarea class="form-control" id="chatBox" form_id="chatForm" placeholder="<%=l 'SET_YOUR_NAME_TO_CHAT' %>" rows=1 disabled></textarea>
<span class="input-group-btn">
<button type="submit" class="btn btn-default help" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SEND_MESSAGE' %>">
<button type="submit" id="sendChat" class="btn btn-default help" data-toggle="tooltip" data-placement="bottom" title="<%=l 'SEND_MESSAGE' %>">
<span class="glyphicon glyphicon-share-alt">
</span>
</button>

Loading…
Cancel
Save