Merge pull request #2380 from trystanclarke/master

Fix typeerror "Cannot read property 'container' of undefined" in autocomplete
This commit is contained in:
Harutyun Amirjanyan 2015-03-15 00:09:42 +04:00
commit dd69f5939c

View file

@ -143,7 +143,7 @@ var Autocomplete = function() {
// on IE preventDefault doesn't stop scrollbar from being focussed
var el = document.activeElement;
var text = this.editor.textInput.getElement()
if (el != text && el.parentNode != this.popup.container
if (el != text && ( !this.popup || el.parentNode != this.popup.container )
&& el != this.tooltipNode && e.relatedTarget != this.tooltipNode
&& e.relatedTarget != text
) {