From e7f0e95e2fe540ddb6c51ec1e1346421420f095e Mon Sep 17 00:00:00 2001 From: Emmanuel Kasper Date: Wed, 9 Mar 2016 15:57:17 +0100 Subject: [PATCH] fix storage selector 'change' event handling the initial loading of the storage selector fires a 'change' event via the 'onLoad' method of its parent class at that point the value of the storage selector is empty, and the callback function fails --- www/manager6/lxc/ResourceEdit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js index 270eb629..6fa56f0d 100644 --- a/www/manager6/lxc/ResourceEdit.js +++ b/www/manager6/lxc/ResourceEdit.js @@ -332,6 +332,9 @@ Ext.define('PVE.lxc.MountPointInputPanel', { hidden: me.unused || !me.create, listeners: { change: function(f, value) { + if (!value) { // initial store loading fires an unwanted 'change' + return; + } if (me.mpdata.type === 'bind') { me.quota.setDisabled(true); me.quota.setValue(false);