VueRenderer's ref is undefined when in production mode #1271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I created a version of the Mention extension, heavily based on the example code when I noticed an issue, the keydown handler didn't work.
(Sample repo of the code not working: https://github.com/thechrisoshow/tiptap-mentions
Running at: https://determined-minsky-6136aa.netlify.app/ )
This was because of how we're sending messages from the parent component to the child using the VueRenderer's
ref
.e.g.
It would work perfectly on development, but it looks like on production the underlying
ctx
object has the $refs stripped away, so the following wouldn't work (from VueRenderer.ts)I noticed though that ComponentInternalInstance has a refs object, so we can fix this problem by using this instead: