mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Fix: Resize event handler does not get cleared from window object,by wrong usage of jQuery api.
An handler get added each time a topic is loaded to the window object jQuery resize api only pass data to the handler when triggered. ```.resize( [eventData ], handler ) ``` The unbind followed in willDestroyElement had no affect. .on(...) or bind(..) support the event.namespace fix was not tested.
This commit is contained in:
parent
52bc03b5e6
commit
b4f1ffd4ea
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ var TopicView = Discourse.View.extend(AddCategoryClass, Discourse.Scrolling, {
|
|||
this.bindScrolling({name: 'topic-view'});
|
||||
|
||||
var self = this;
|
||||
$(window).resize('resize.discourse-on-scroll', function() {
|
||||
$(window).on('resize.discourse-on-scroll', function() {
|
||||
self.scrolled();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue