Calendar throws an error on Firefox
I'm submitting a ... (check one with "x")
[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
Calendar is broken in latest release (4.1.0-rc3) on FireFox. Throws an error when selecting a date, see: https://www.primefaces.org/primeng/#/calendar
ReferenceError: event is not defined
Stack trace:
2EHD/a</l.prototype.bindDocumentClickListener/this.documentClickListener<@https://www.primefaces.org/primeng/47.4db46cdbb3275d80427e.chunk.js:1:87901
v/<@https://www.primefaces.org/primeng/vendor.46a34ca45fa3d2934a3d.bundle.js:725:513
ZSR1/</</</l</t.prototype.invokeTask@https://www.primefaces.org/primeng/polyfills.e58ce8c4ba55a262f790.bundle.js:36:8037
onInvokeTask@https://www.primefaces.org/primeng/vendor.46a34ca45fa3d2934a3d.bundle.js:359:6667
ZSR1/</</</l</t.prototype.invokeTask@https://www.primefaces.org/primeng/polyfills.e58ce8c4ba55a262f790.bundle.js:36:7950
ZSR1/</</</u</r.prototype.runTask@https://www.primefaces.org/primeng/polyfills.e58ce8c4ba55a262f790.bundle.js:36:3205
t/this.invoke@https://www.primefaces.org/primeng/polyfills.e58ce8c4ba55a262f790.bundle.js:36:9019
Expected behavior
Should not throw an error.
- Browser: [ Firefox 54.0.1 (32-bit) ]
Could you please create a plunkr I am unable to replicate it.
http://plnkr.co/edit/K6rpRi?p=preview
Right, did forget: The error occurs when you click on a date in the calendar.
I tried your plunkr and it is working as expected.
https://pasteboard.co/Gzej9w8.png
Okay, so maybe the error is dependent on the version of Firefox? For me, I get the error in our system, on your demo page (https://www.primefaces.org/primeng/#/calendar) and on the plunkr. One of our users called our support line with the same issue (didn't ask for firefox version), reverting back to older version fixed this.
Older version of firefox right? Because if it is about 4.1.0-RC3 that should be fixed
No! Everything was working fine. Installed 4.1.0-RC3 wich was uploaded on our server wich apparently broke the calendar for users on firefox! I don't know what version of primeng that is installed on https://www.primefaces.org/primeng/ but the error is thrown there also for me.
Anyway, reverting back to primeng 4.0.2 fixed this issue for us (I have another problem on 4.1.0-rc1). I don't know if there is some other information I can give that could possibly help, more than the provided firefox version of mine in the first post. But if so, please give me a shout! :)
I had the same problem for firefox with version 4.1.0-rc2, but not only with calendar but with dropdown as well. Changing version to 4.0.2-rc2 as patriknil90 said, fixed it for now. My firefox is 54.0.1 (32-bit)
I'm having the same issue with 4.1.0-rc.3 in FF Developer Edition 55.0b6 & 55.0b7 (64-bit, macOS Sierra). Same error as @patriknil90.
Happy to test anything, if I can help.
This is due to change made for issue #1874.
This line here: if (_this.closeOverlay) { _this.overlayVisible = false; *******_this.onClose.emit(event); ******* }
"event" is not passed into this.renderer.listen function, so JS has no idea what it is.
It is fixed for 4.1.1