sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
424 stars 183 forks source link

[BUG]: Run in production mode: Heading dropdown disappears. #269

Closed jpwichern closed 3 years ago

jpwichern commented 3 years ago

I'm submitting a

Description

When compiling our project which uses the ngx-editor v5, in production mode (ng build --prod, ng serve --prod), the heading drop down disappears. It also leaves no traces in the DOM. Attached is a picture how the menu bar looks like when using our app with ng serve in production mode and developer tools open. The separator is selected, where we would expect the heading drop down on the right. The heading drop down is present when not compiling in production mode... also as an extra test I removed our work in progress clipboard extension (the X C A on the left side) to make sure that wasn't the cause. Unfortunately that didn't help out...

Version Information

ngx-editor: ^5.0.0-alpha.9
angular: ~9.1.9

Browser


heading error

sibiraj-s commented 3 years ago

Hmm, strange 🤔 . I will look into this. It would be great if you could put together a stackblitz to reproduce this.

Also, PR's are welcome 😄

jpwichern commented 3 years ago

I tried to use the stackblitz you sent us from a previous issue, updated ngx-editor to alpha 9 and added --prod flags but there the header dropdown just appeared. So either something else goes wrong in my code which I can't find that has a particular impact on the menu or the bug isn't reproducable with stackblitz. However I did find a console warning in the log now which I overlooked earlier:

Unkown dropdown group: heading ... main.c0c037afcad69cffceb2.js:1:832245

So, the heading key isn't seen as a dropdown group when compiling for production... Of course no such warning is present when compiling or serving without --prod ...

sibiraj-s commented 3 years ago

Thanks. Incase if you are not using the defaults, post your config here. I will check. Meanwhile I will try to setup a locally and verify. I will update you back by tomorrow.

sibiraj-s commented 3 years ago

I was able to reproduce it in angular 10, where as it works fine in angular 11 strange 🤔 . I will make a patch soon.

sibiraj-s commented 3 years ago

Try with the recent alpha.

jpwichern commented 3 years ago

I will, monday when I'll continue work on the editor with my colleague. I'll keep you posted on the results.

On Sat, Nov 21, 2020 at 4:34 PM Sibiraj notifications@github.com wrote:

Try with the recent alpha.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sibiraj-s/ngx-editor/issues/269#issuecomment-731594848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3SFXCOIYDPPLZTNERIB7LSQ7MZRANCNFSM4T4Z4H3Q .

sibiraj-s commented 3 years ago

@jpwichern did it work?

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.