Fix Firefox search box compatibility issue

Make event handling syntax compatible with Firefox.
Fixes #34.