bbc / react-transcript-editor

A React component to make correcting automated transcriptions of audio and video easier and faster. By BBC News Labs. - Work in progress
https://bbc.github.io/react-transcript-editor
Other
571 stars 165 forks source link

Cannot read property 'scrollIntoView' of null - Storybook error #213

Open NickRuiz opened 5 years ago

NickRuiz commented 5 years ago

Describe the bug While editing the transcript while the audio was playing, I received the following error:

TypeError: Cannot read property 'scrollIntoView' of null
    at TimedTextEditor.getCurrentWord (http://localhost:6006/main.6594fe536ebdd15b9dc8.bundle.js:2293:396)
    at TimedTextEditor.render (http://localhost:6006/main.6594fe536ebdd15b9dc8.bundle.js:2301:22)
    at finishClassComponent (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:162314:31)
    at updateClassComponent (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:162267:24)
    at beginWork$1 (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:164015:16)
    at HTMLUnknownElement.callCallback (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:144269:14)
    at Object.invokeGuardedCallbackDev (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:144318:16)
    at invokeGuardedCallback (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:144373:31)
    at beginWork$$1 (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:169637:7)
    at performUnitOfWork (http://localhost:6006/vendors~main.6594fe536ebdd15b9dc8.bundle.js:168548:12)

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings Panel
  2. Click on 'Pause while Typing' to deselect
  3. Begin editing the transcript while the audio is playing. Double click a word and press the 'delete' button on your keyboard to erase the word and press delete a couple of times to remove the extra whitespace.
  4. See error

Expected behavior Editing words in real-time should not trigger an error.

Screenshots

Desktop (please complete the following information):

Additional context

LucasNeevs commented 3 years ago

Anyone has solved it? I have the same problem actually

JAGANNATH-R-KULAKARNI commented 3 years ago

Me too I have the same problem too

pietrop commented 3 years ago

Shameless plug to an alternative version, that builds on the lessons learned from this project, pietrop/slate-transcript-editor - storybook