-
Notifications
You must be signed in to change notification settings - Fork 407
Cannot use zone.js with SemanticUI Search #319
Comments
Looking for a response or thoughts to this issue. I'm not the only one having issues with how |
I second this. I am using Angular in SharePoint and it is hijacking the onsubmit event for the form. Content editors cannot save edits when zone.js is included. Is there a way to possibly scope zone.js so, for example, only elements that are wrapped in a parent element that has a specific attribute or class are affected by it? I noticed in the property-descriptor.ts file (line: 15) it is modifying the HTMLElement interface's prototypes, but it might be possible to do some checking on the getters and setters to conditionally hijack events. |
same problem here with the Semantic UI search component.. are there any known side-effects when commenting out thanks! |
Still looking for a response to this. |
Yes. Me, too. |
I am also interested in more actions on this. |
I just saw this in one of my own projects using Semantic UI. Probably a bad idea to patch events like this, although im still not really sure what's causing this to break in SUI. |
I was able to fix the problem by changing this line: Line 86 in ed69756
to |
I've loosened the typechecks to use |
@jlukic, @veered I tried both your methods but can't see that they fix the problem? This http://plnkr.co/edit/OOA6TWvvk58q2TRqSkz8?p=preview should have both of your tweaks but the problem persists. Mind creating a plunkr showing it's working? Thanks for your participation with this issue. |
If you try it with just my change it works for me http://plnkr.co/edit/O475D4x9SXqDu9naIjpk?p=preview |
@veered you are correct. It does feel like this is a change that should be made in SemanticUI though if it's indeed an issue with |
I think this is genuinely a bug in zone.js. On a normal webpage I found it by noticing that keyups were triggering search and breakpointing in different places until I notice the difference I described above. |
Hi,
I initially posed this bug in here angular/angular#7750 since I'd only narrowed it down to
angular2-polyfills.js
before I left for holiday. Now that I'm back I dug deeper and found thatzone.js
is the culprit and I can see there are others having similar issues with 3rd party libs. More specifically, in my case, it's becausezone.js
is patching theonkeydown
event which is used by SemanticUIs Search https://github.com/Semantic-Org/Semantic-UI/blob/master/dist/components/search.js#L100Here's an updated plunker with only
zone.js
included http://plnkr.co/edit/SQBxicLoQ5LiFXJgT4qm?p=preview. Commenting oututils_1.patchOnProperties(HTMLElement.prototype, eventNames);
the search tool works as intended again or even just removingonkeydown
from the patched events "solves" the issue.This is causing headaches for many people trying to use 3rd party libs with Angular2. Is there a fix coming or a workaround available? Any insight in why this is happening?
Regards,
Daniel
The text was updated successfully, but these errors were encountered: