From 319dd9a03e200bd196b4a6ed1e455e7906f90de1 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 23 May 2014 13:05:46 +0200 Subject: [PATCH] Wait a bit before enabling owner's action button As all the channels have to be ready first --- public/js/vroom.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index 34a6b67..c07e574 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -374,16 +374,18 @@ function initVroom(room) { id: 'actionKick_' + id, click: function() { kickPeer(id) }, }).prop('title', locale.KICK_PEER))); - $(div).hover( - function(){ - if (peers.local.role == 'owner'){ - $('#ownerActions_' + id).show(200); + setTimeout (function(){ + $(div).hover( + function(){ + if (peers.local.role == 'owner'){ + $('#ownerActions_' + id).show(200); + } + }, + function(){ + $('#ownerActions_' + id).hide(200); } - }, - function(){ - $('#ownerActions_' + id).hide(200); - } - ); + ); + }, 3500); // Create a new dataChannel // will be used for text chat and displayName var color = chooseColor();