I have coded a custom plugin for a feature to insert a predefined text at the caret location in a text box.
The feature when implemented on any code sandbox works as expected, however when tested inside the Bubble platform, it doesn’t work the first time it’s executed, only on the second time.
This is where it gets interesting, after the second time the code is ran, it executes the code in multiples.
For example, instead of only placing the predefined text once, it will place it twice, and the next time the function is ran it places the text three times.
Has anyone ever seen this behavior before? Is there a fix action?
Is there a way to accomplish this using basic bubble functions?
This issue is extremely frustrating as I have seen it operational here:
However when I use that exact code, it doesn’t function at all and when I’ve modified it, it will only work as expected in an environment outside of Bubble.
I cannot even seem to get a recording of the issue because it seems to error the entire browser when ran as a bubble plugin.
Here’s a link to the code working in a sandbox: