Applied to master. Thanks!
On 08/15/2016 03:50 PM, Jose Ricardo Ziviani wrote:
- Double clicks fire 'click' events twice, and this may
confuse users
because the backend will throw an error about plugging the same adapter
twice. This commit prevents such events.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index a59d51a..dcaafb8 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -536,6 +536,8 @@ kimchi.guest_edit_main = function() {
var pciDeviceButtonHandler = function() {
$('.btn.btn-link', '#form-guest-edit-pci').on('click',
function(event) {
event.preventDefault();
+ if (event.originalEvent.detail > 1)
+ return;
var obj = $(this);
var objIcon = obj.find('i');
var id = obj.parent().parent().attr('id');