Skip to content

Commit

Permalink
FIX: tabindex was not set on the category chooser when creating a topic.
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Sep 4, 2014
1 parent 742e2b1 commit 52e25c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Expand Up @@ -16,7 +16,7 @@
{{#if canEdit}}
{{#if showEditReason}}
<div class="edit-reason-input">
{{text-field value=editReason tabindex="5" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
{{text-field value=editReason tabindex="7" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
</div>
{{else}}
<a {{action displayEditReason}} class="display-edit-reason">{{i18n composer.show_edit_reason}}</a>
Expand Down Expand Up @@ -44,7 +44,7 @@

{{#unless model.privateMessage}}
<div class="category-input">
{{category-chooser valueAttribute="id" value=model.categoryId scopedCategoryId=scopedCategoryId}}
{{category-chooser valueAttribute="id" value=model.categoryId scopedCategoryId=scopedCategoryId tabindex="3"}}
{{popupInputTip validation=view.categoryValidation shownAt=view.showCategoryTip}}
</div>
{{#if model.archetype.hasOptions}}
Expand All @@ -59,7 +59,7 @@
<div class='textarea-wrapper'>
<div class='wmd-button-bar' id='wmd-button-bar'></div>
<div id='wmd-preview-scroller'></div>
{{composer-text-area tabindex="3" value=model.reply}}
{{composer-text-area tabindex="4" value=model.reply}}
{{popupInputTip validation=view.replyValidation shownAt=view.showReplyTip}}
</div>
<!-- keep the classes here in sync with post.js.handlebars -->
Expand All @@ -81,8 +81,8 @@

{{#if currentUser}}
<div class='submit-panel'>
<button {{action save}} tabindex="4" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n composer.title}}">{{model.saveText}}</button>
<a href='#' {{action cancel}} class='cancel' tabindex="4">{{i18n cancel}}</a>
<button {{action save}} tabindex="5" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n composer.title}}">{{model.saveText}}</button>
<a href='#' {{action cancel}} class='cancel' tabindex="6">{{i18n cancel}}</a>
</div>
{{/if}}

Expand Down
5 changes: 3 additions & 2 deletions app/assets/javascripts/discourse/views/combo-box.js.es6
Expand Up @@ -8,6 +8,7 @@
**/
export default Discourse.View.extend({
tagName: 'select',
attributeBindings: ['tabindex'],
classNames: ['combobox'],
valueAttribute: 'id',

Expand Down Expand Up @@ -74,8 +75,8 @@ export default Discourse.View.extend({
},

willClearRender: function() {
var chosenId = "s2id_" + this.$().attr('id');
Ember.$("#" + chosenId).remove();
var elementId = "s2id_" + this.$().attr('id');
Ember.$("#" + elementId).remove();
}

});

0 comments on commit 52e25c9

Please sign in to comment.