Fixing broken click handler for feed selector.

This commit is contained in:
Samuel Clay 2016-03-09 13:17:28 -08:00
parent c7dd608885
commit 611b857acc
2 changed files with 6 additions and 3 deletions

View file

@ -75,7 +75,7 @@ NEWSBLUR.Views.FeedSelector = Backbone.View.extend({
filter_feed_selector: function(e) {
var $input = this.$(".NB-feeds-selector-input");
var input = $input.val().toLowerCase();
if (input == this.last_input) return;
if (input == this.last_input && input.length) return;
this.last_input = input;
this.selected_feeds.each(function(feed) {

View file

@ -291,7 +291,7 @@ NEWSBLUR.Views.FeedTitleView = Backbone.View.extend({
open: function(e, options) {
options = options || {};
if (this.options.feed_chooser) return;
if (this.options.feed_chooser && !options.ignore_feed_selector) return;
if (this.options.type != 'feed') return;
if (e.which >= 2) return;
if (e.which == 1 && $('.NB-menu-manage-container:visible').length) return;
@ -307,7 +307,7 @@ NEWSBLUR.Views.FeedTitleView = Backbone.View.extend({
e.preventDefault();
e.stopPropagation();
if (this.model.get('has_exception') && this.model.get('exception_type') == 'feed') {
NEWSBLUR.reader.open_feed_exception_modal(this.model.id);
} else if (this.model.is_social()) {
@ -324,6 +324,9 @@ NEWSBLUR.Views.FeedTitleView = Backbone.View.extend({
},
highlight_event: function(e) {
if (this.$el.hasClass('NB-feed-selector-active')) {
return this.open(e, {'ignore_feed_selector': true});
}
return this.highlight();
},