Slug field unresponsive when typing
Switch to the feature/react-snippet-editor branch
- yarn start and go to localhost:3333
- click on the Slug field and type something
- the responsiveness when typing is extremely slow with any browser and most importantly some typed characters are completely missing
- also: try to press and hold backspace: it deletes just one character: expected: it should progressively delete all characters from right to left
In the screenshot below: using Chrome on maOS I've typed hello-my-post-title and here's what I get:
I tested it in both the standalone and in wordpress-seo context.
On the standalone it is an awful experience. but for some reason, it does work fine in wordpress-seo context. This is high on the priority list, but not as high as some other issues.
Hm right. I see the standalone example uses a different callback for onChange:
this.onChangedData = debounce( this.onChangedData.bind( this ), 150 );
which is completely different from the actual one used in the plugin. It's also debounced, hence the mess while typing. We should really keep the standalone example as close as possible to the real usage, to avoid this kind of misunderstanding (and wasted debugging time).
Just noticed with Safari the slow response is noticeable also in the wordpress-seo context, not so slow as in the standalone version, but still noticeable.