Open yairEO opened 10 years ago
On a contemporary browser, you can get by with no JavaScript whatsoever, using the :focused
and :empty
selectors in CSS. But I no longer work for Spruce, so I can't update it here. A good solution for new browsers is to use feature detection and pure CSS when supported, and to use ID selectors for specific elements in your page for old browsers.
I've tried it with CSS only and this fails to work. please show me a test page where it should work, and I will show you, how it breaks in a common situation.
@CraigStuntz you actually have access to this repo now. For some reason I only partially updated it before.
in your JS code, you are using an event-delegation such as:
this is a serious mistake and should be avoid at all costs to use such a poor-performance selector and listen for a lot of events for the whole document..this is insanely expensive!