Amazingly, only one weird bug broke IE8, and now it's worked around
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 20 Jan 2012 23:28:50 +0000 (18:28 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 23 Jan 2012 17:27:00 +0000 (12:27 -0500)
It's a stupid one though (of course). See comments in code.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/opac/skin/default/js/search_bar.js

index 5f8cdb9..9a86ede 100644 (file)
@@ -48,6 +48,12 @@ function updateSearchTypeSelector(id) {
 }
 
 function autoSuggestInit() {
+    /* For the "style" argument to the constructor below, IE 8 hates it if
+     * we supply dojo.attr("search_box", "style") as the value, which worked
+     * nicely in Google Chrome and Firefox.  Filtering the "font" key/value
+     * pair out of that object gets IE not to throw an error, but even then
+     * the result is oddly ugly borders. So for now we're sadly hardcoding
+     * style. */
     var widg = new openils.widget.AutoSuggest(
         {
             "storeArgs": {
@@ -62,7 +68,7 @@ function autoSuggestInit() {
                 if (event.charOrCode == dojo.keys.ENTER)
                     searchBarSubmit();
             },
-            "style": dojo.attr("search_box", "style"),
+            "style": {"width": "260px"},
             "value": ((getTerm() != null) ? getTerm() : "")
         }, "search_box"
     );