Some more taglist issues:

- stop extremely large sizing in some cases
- make sure toggle button is correctly removed
This commit is contained in:
Nathan Gray 2016-04-12 22:25:29 +00:00
parent 95e1cd00ff
commit 988720340d
2 changed files with 9 additions and 4 deletions

View File

@ -345,14 +345,19 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
});
$j('body').one('click',function() {
taglist.collapse();
});},1
});},100
);
this.$taglist.one('collapse', function() {
wrapper.remove();
widget.div.removeClass('expanded');
});
},this));
},this))
.on('collapse', function() {
widget.div.removeClass('expanded');
});
$j('.ms-trigger',this.div).on('click', function(e) {
e.stopPropagation();
})
// Unbind change handler of widget's ancestor to stop it from bubbling
// taglist has its own onchange
$j(this.getDOMNode()).unbind('change.et2_inputWidget');

View File

@ -1085,7 +1085,7 @@
if(cfg.selectionPosition === 'inner' && !cfg.selectionContainer && ms.container.is(':visible')) {
var inputPadding = ms.input.outerWidth(true) - ms.input.width();
ms.input.width(0);
inputOffset = ms.input.offset().left - ms.selectionContainer.offset().left;
inputOffset = Math.max(0,ms.input.offset().left - ms.selectionContainer.offset().left);
w = ms.container.width() - inputOffset - (cfg.hideTrigger ? inputPadding : 42);
ms.input.width(w);
}