rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanton Sievers" <siever...@gmail.com>
Subject Re: Review Request 15460: Home view binds click events multiple times
Date Wed, 13 Nov 2013 21:57:01 GMT


> On Nov. 13, 2013, 8:17 p.m., Matt Franklin wrote:
> > https://svn.apache.org/repos/asf/rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_ui.js,
line 689
> > <https://reviews.apache.org/r/15460/diff/2/?file=382754#file382754line689>
> >
> >     Does off unbind events bound with the click function or only the on function?

The documentation is vague on this subject but based on my testing it does.

For clarity, I can replace the off() calls with unbind() calls.  Or, I can update the .click()
calls to be .on('click') calls, which is the preferred method in jQuery 1.7+. 


- Stanton


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15460/#review28824
-----------------------------------------------------------


On Nov. 12, 2013, 7:30 p.m., Stanton Sievers wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15460/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2013, 7:30 p.m.)
> 
> 
> Review request for rave.
> 
> 
> Bugs: RAVE-1078
>     https://issues.apache.org/jira/browse/RAVE-1078
> 
> 
> Repository: rave
> 
> 
> Description
> -------
> 
> From the JIRA:
> 
> The HomeView that gets registered in rave_ui.js will bind click events every time the
view's render() method is called.  This causes problems, for instance when the widget is maximized
and then minimized, because the elements to which the events were bound are never removed
nor are the events ever unbound.  
> 
> Thus, in the case of maximizing and then minimizing a widget (i.e. navigating to the
"canvas" view and then back to the "home" view) the events are bound multiple times.
> 
> You can see this behavior if you set a breakpoint in the "maximize()" method defined
in HomeView.prototype.render in rave_ui.js.  If you repeat the process of maximizing and minimizing
the widget, the "maximize()" method will get called more than once.
> 
> 
> Diffs
> -----
> 
>   https://svn.apache.org/repos/asf/rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_ui.js
1541190 
> 
> Diff: https://reviews.apache.org/r/15460/diff/
> 
> 
> Testing
> -------
> 
> Existing tests pass.
> 
> 
> Thanks,
> 
> Stanton Sievers
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message