Closed jatin2505 closed 6 years ago
Some polyfills seem to be missing for the demo app. I will try to fix it soon. But library itself should work though.
I am getting this couple of errors multiple time (only on IE11) and not able to drag. I have not set any drag or drop class, and they are from smooth-dnd component (Angular)
ERROR TypeError: Unable to set property 'className' of undefined or null reference "ERROR" {
__proto__: { },
description: "Unable to set property 'className' of undefined or null reference",
message: "Unable to set property 'className' of undefined or null reference",
name: "TypeError",
ngDebugContext: { },
number: -2146823281,
stack: "TypeError: Unable to set property 'className' of undefined or null reference
at DraggableComponent.prototype.ngAfterViewInit (eval code:20:9) at callProviderLifecycles (eval code:12964:9) at callElementProvidersLifecycles (eval code:12931:13) at callLifecycleHooksChildrenFirst (eval code:12914:17) at checkAndUpdateView (eval code:14069:5) at callViewAction (eval code:14411:21) at execEmbeddedViewsAction (eval code:14369:17) at checkAndUpdateView (eval code:14061:5) at callViewAction (eval code:14411:21) at execComponentViewsAction (eval code:14343:13)" }
ERROR CONTEXT [object Object] "ERROR CONTEXT" {
__proto__: { },
component: { },
componentRenderElement: { },
context: { },
elDef: { },
elOrCompView: { },
elView: { },
injector: { },
nodeDef: { },
nodeIndex: 1,
providerTokens: [ ],
references: { },
renderNode: { },
view: { }
}
Any ideas?
Yes you were right. Somehow parentElement of a viewchild was undefined in draggableComponent in ngAfterViewInit. It worked when when I used parentNode. fixed in v 0.1.6.
Hi kutlugsahin, Something wrong in v0.1.6 and I can't drop the card now. I took an angular 2 seed and added the CardsComponent. Here are the steps: 1) Cloned https://github.com/angular/angular2-seed 2) npm install 3) npm i ngx-smooth-dnd 4) Added the following cards code in a view https://github.com/kutlugsahin/ngx-smooth-dnd/blob/master/apps/demo/src/pages/cards.ts
Request you to try and let me know if I am doing anything wrong.
just published a fix for it. try 0.1.7
Thanks so much, it works fine in Chrome and no errors in IE 11 as well.
SCRIPT5022: Exception thrown and not caught File: polyfills.bundle.js, Line: 804, Column: 36