guardian / scribe

DEPRECATED: A rich text editor framework for the web platform
http://guardian.github.io/scribe/
Apache License 2.0
3.51k stars 245 forks source link

".active" class is being maintained on element even after loosing focus #414

Open bytasv opened 9 years ago

bytasv commented 9 years ago

Hello,

I've just started using scribe editor and found strange bug that ".active" class on toolbar elements is maintained even after editor loosed focus. This is odd and might mislead users because some options are shown as active even though no visible text selection is currently on...

Simple steps to reproduce:

  1. Go to http://guardian.github.io/scribe/
  2. Select Hello
  3. Give bold
  4. Make editor loose focus
  5. Outcome: http://grab.by/IvxG

Expected result: removing focus from editor - removes all active classes from toolbar buttons

Also as soon as I give focus back, active classes are gone

alexeygolev commented 9 years ago

I think it belongs here https://github.com/guardian/scribe-plugin-toolbar As far as I understand you can just call toolbar's updateUi method on blur.