[Rt-commit] rt branch, 4.4/fix-select-empty-value-on-ie, created. rt-4.4.3-86-g5bfa339ae

? sunnavy sunnavy at bestpractical.com
Thu Dec 6 16:35:30 EST 2018


The branch, 4.4/fix-select-empty-value-on-ie has been created
        at  5bfa339aef38bb71e3c4f82ab3d1b7e86de58f54 (commit)

- Log -----------------------------------------------------------------
commit 5bfa339aef38bb71e3c4f82ab3d1b7e86de58f54
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Dec 7 05:21:31 2018 +0800

    Add empty value option first when rebuilding select options to make IE happy
    
    Otherwise, IE(at least 11) wrongly selects the first non-empty option.
    e.g. on search chart page, there will be 3 repetitive Group By "Status"
    and 3 repetitive Calculate "Ticket count" :/

diff --git a/share/static/js/event-registration.js b/share/static/js/event-registration.js
index eaacbdb57..10902d089 100644
--- a/share/static/js/event-registration.js
+++ b/share/static/js/event-registration.js
@@ -59,10 +59,10 @@ jQuery(function() {
             .clone(true, true)
             .attr("name", name + "-Groups")
             .find("option").remove().end()
+            .prepend( complete.find("option[value='']") )
             .find("optgroup").replaceWith(function(){
                 return jQuery("<option>").val(this.label).text(this.label);
             }).end()
-            .prepend( complete.find("option[value='']") )
             .insertBefore(this);
 
         // Synchronize the <select> we just generated

-----------------------------------------------------------------------


More information about the rt-commit mailing list