Added unit tests that show that javascript bug https://bugs.launchpad.net/leo-editor/+bug/1222947 has been fixed.