Primeng: "Cannot read property 'offsetParent' of null" when changing the route on autocomplete selection

Created on 7 Aug 2018  路  5Comments  路  Source: primefaces/primeng

https://github.com/primefaces/primeng/blob/8abb22cd37e452fd017f6c03341936de8618823c/src/app/components/autocomplete/autocomplete.ts#L220-L224

 TypeError: Cannot read property 'offsetParent' of null
     at DomHandler.push../node_modules/primeng/components/dom/domhandler.js.DomHandler.relativePosition (domhandler.js:80)
     at AutoComplete.push../node_modules/primeng/components/autocomplete/autocomplete.js.AutoComplete.alignOverlay (autocomplete.js:257)
     at autocomplete.js:80
     at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
     at Object.onInvokeTask (core.js:3813)
     at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
     at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
     at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:496)
     at ZoneTask.invoke (zone.js:485)
     at timer (zone.js:2054)

Works correctly when removing the timeout. on line 222

Using angular 6.0.3
Using Primeng 6.1.0-rc.1

defect

Most helpful comment

Same here

All 5 comments

Same here

I am seeing the same thing here.
Angular 6.1.2
PrimeNG 6.1.0

Using workaround by @massieb is working nicely for me.

Same problem :/

I was wondering if it was possible to merge this fix in the primeng librarie before the next release?

Was this page helpful?
0 / 5 - 0 ratings