mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
Adds box-shadow to `#searchbox` when either `#search_query` or any of the pills have focus. Uses jquery instead of pure css as the `:focus` event occurs on `#search_query`, while we want to add box-shadow to `#searchbox`. This could have been done with `:focus-within` CSS selector, but it is not supported in IE or Opera. `#search_query` already had an onfocus/focusout listener, adding listeners to `#searchbox.pills` for those events wouldn't have worked as you don't want the focusout event to fire when the focus shifts from input to pill. Also adds `focusin`, `focusout` and `css()` to zjquery. `css` is same as `val`, except it returns an empty object in case of no value instead of an empty string. I don't think `css()` is valid syntax in actual jquery.