Backport: [#31036] Search is broken on Chrome #1312 Ref #3724

This backports: https://github.com/joomla/joomla-cms/pull/1312 to 2.5.x as requested here: https://github.com/joomla/joomla-cms/issues/3724

Commit against staging/master was: https://github.com/joomla/joomla-cms/commit/7c608a35eb7c7addd3903bfb1c7775858e1161c7