draft-js
draft-js copied to clipboard
Memory leak in generate random key
Do you want to request a feature or report a bug?
Reporting a bug
What is the current behavior and expected behavior?
Currently the generateRandomKey function is keeping track of the keys already generated using an object.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/gmertk/e61z7nfa/.
What is the expected behavior?
This type of tracking is fine in case of client side rendering but when it comes to server side rendering we need an API to reset the seenKeys object as it grows infinitely.
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
This issue has been there in the system since begining.