MassAutocomplete icon indicating copy to clipboard operation
MassAutocomplete copied to clipboard

IE9 not poping up list (doing select query) after initial selection.

Open potgieterdl opened this issue 9 years ago • 7 comments

Hi,

Tested Ie9 in my own code and on first State selection input on web site under examples. When you type "Ala", the select list appears and you can select as normal. When you click out of field and then back in, change the wording or retype from scratch the suggest doesnt seem to fire as it should.

Once you click out the suggest sometimes fires on blur which shouldnt be the case.

I`m trying to see what the issue is, but not making much progress.

potgieterdl avatar Apr 21 '15 10:04 potgieterdl

Hey, IE9 is always a pleasure :).

It will probably take me a little while to check this on IE9 since i'm working on ubuntu but i'll try to get to it some time soon.

Just by reading your scenario i suspect that maybe the blur event is not firing as it should and the AC is not being detached. Can you try and debug that in the meanwhile, around line 222 ?

hakib avatar Apr 26 '15 07:04 hakib

Hi Hakib, Did you managed to look into the issue? I tried to resolve issue but didn't get success.

anilkumar8212 avatar May 12 '15 11:05 anilkumar8212

I've taken a look at the issue on IE and i can reproduce. From what I've seen it's an issue with IE9 only (10 & 11 worked fine for me).

It seems that the second time you set focus onto the field the model watch is set (attach) but when the value changes the watch is not firing (hence no suggest). I have no idea what can cause this specific problem on IE 9 only. I will keep investigating. If there are any IE9 veterans then maybe take a look as well.

hakib avatar May 14 '15 06:05 hakib

Hi,

I've ran into this issue on IE11 a couple of days ago and finally found the cause. For IE11 and older Angular uses a hack to handle input change: instead of binding on 'input' they listen for 'keydown'. In detach() you unconditionally unbind 'keydown' handlers including Angular's. Storing the handler functions' reference and passing them to unbind() solved the problem for me.

mercury83 avatar Aug 18 '16 10:08 mercury83

Hey @mercury83, thats a nice catch.

I'm just wondering, in detach I unbind only the function bound by the directive(keeping existing bound events in tact). Can you maybe debug it using IE 11 and take a snapshot of the event listeners before and after unbind to show that existing bound events were unbound after detach?

hakib avatar Aug 20 '16 16:08 hakib

Sorry, I take it back, I were using an older version of your lib, could have saved me time and headache if I checked it earlier (-_-)'.

mercury83 avatar Aug 21 '16 19:08 mercury83

No worries ;)

hakib avatar Aug 21 '16 21:08 hakib