FIX: You can't change a subject whilst Flagging

Meta: [You can't change a subject whilst Flagging](http://meta.discourse.org/t/you-can-t-change-a-subject-whilst-flagging/6887)

This revert a change made by @eviltrout in b794830a25 in the `flag_view.js`.
The `Em.run.schedule('afterRender', function() {...})` is apparently not enough. Had to schedule the event on the next run loop.

Hopefully, the PR emberjs/ember.js#1235 will soon be merged in and we'll have a proper radio button control in Ember.js.
This commit is contained in:
Régis Hanol 2013-05-27 22:29:24 +02:00
parent 20e88f18ee
commit f184090444
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ Discourse.FlagView = Discourse.ModalBodyView.extend({
this.set('postActionTypeId', action.id);
this.set('isCustomFlag', action.is_custom_flag);
this.set('selected', action);
Em.run.schedule('afterRender', function() {
Em.run.next(function() {
$('#radio_' + action.name_key).prop('checked', 'true');
});
return false;