-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selecting cells in table causes "Class constructor Selection cannot be invoked without 'new'" error #96
Comments
So I poked around at this, and came up with the following: It looks like this project uses buble to transpile the code into es5 compliant code. When I try to create a CellSelection by clicking and dragging across cells in a table, I get errors on the following line in cellselection.js:
which transpiles to:
It appears they have an issue open for this bug: bublejs/buble#130 |
Just stumbled into the same error today and seeing this has been open for a while... are there any known workarounds to this issue? |
@mbostler Also noticed this problem today! A solution might be to tell webpack to transpile them down to es5 ueberdosis/tiptap#521 - I'll try that |
Still with the same problem :/ |
This issue seems to be back. Over at tiptap I'm currently trying to port our typings over to the new versions of prosemirror - but since updating, I receive the same error. Seems like this is also happening in other editor components / frameworks, see: |
@hadielyakhni et all Can confirm that simply replacing buble with babel to do the transpiling seems to do the trick for me. Published the package on npm as After linking to this package I have yet to see the Cell Selection issues appear. Diff between the fork and base is currently public and can be seen here: master...contently:master |
Great one @mbostler Could someone from the prosemirror maintainment team take a look into this? Seems to break the functionality of prosemirror for quite a few people. If this is done I can finish my port to the new versions for Tiptap - would love to do that as soon as possible. Thanks already 🙏 |
You can use @mbostler package by adding
then remove node_modules/ folder and re-install all packages. It works for me. |
It appears
@mbostler is it possible to remove Update: Oops, I was mistaken, the older version of |
We have forked and resolved to use prosemirror-tables in our product. The ERR_REQUIRE_ESM issue was resolved this way, I hope this helps: bitjourney#2 I will gladly submit a PR if prosemirror-tables maintenance is resumed. |
Is there any update? I meet this problem in other editor built with ProseMirror. |
Could anyone provide me a minimal reproduction git repo or codesandbox link? I will look into it once I can reproduce it. |
Hi, @ocavue A fixed configuration for webpack + babel here: Hope those infomation make help. |
Glad to hear that. I will close this issue since it's unlikely a remirror bug. |
Selecting cells in a table causes the error "Class constructor Selection cannot be invoked without 'new'". This is the output from the source inspector where the error occurs:
Seems like it does not get a Selection instance correctly.
I have added the plugins columnResizing(), tableEditing() in this order.
Adding and resizing the table works fine.
Did I miss something?
Best regards
Vu
The text was updated successfully, but these errors were encountered: