hgtonight / Application-Yaga

Yet Another Gamification Application is a Garden application that provides a gamification platform for Vanilla Forums and other Garden applications.
GNU General Public License v2.0
28 stars 23 forks source link

Edit badges: Select reset bug in Firefox with Vanilla master #65

Closed bleistivt closed 9 years ago

bleistivt commented 9 years ago

I don't know if you want to fix this (I would wait for 2.3), but just in case someone runs into this in the future:

Test in Firefox http://jsfiddle.net/95r3uf91/4/

On blur the select changes back. This happens on the edit badges screen when using Yaga with vanilla master and Firefox.

Happens in jQuery 1.9+ (where the attr() vs prop() change was), but it might as well be a browser bug.

changing

$(this).find("option[value='" + currentValue + "']").attr('selected', 'selected');

to

$(this).find("option[value='" + currentValue + "']")
  .attr('selected', 'selected')
  .prop('selected', true);

});

in admin.badges.css fixes it, but that shouldn't be necessary.

hgtonight commented 9 years ago

A fix is in Vanilla core?

If that is the case, I will let that sort this out.

bleistivt commented 9 years ago

No, it works in 2.1 right now, but will break if vanilla 2.3 will ship as master is today.

You can test this out by opening my jsfiddle in firefox and changing the jQuery version. Once the select element loses focus it changes back to the original value.

However, this only happens in Firefox, which makes me think it is a browser bug or incompatibility.

Anyway, if nothing has changed about this when 2.3 is released, the fix above can be applied.