Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2008 at 12:03 UTC
Updated:
6 Oct 2008 at 20:12 UTC
The ajaxViewResponse function is responsible for refreshing the view display.
After it does this, it calls Drupal.attachBehaviors() to attach behaviors to the new HTML fragment that has just been injected into the page.
However, instead of sending this new HTML to attachBehaviors(), it sends the old HTML that is swapped out.
(This bug stems from incorrect use of jQuery's replaceWith(). That method is quite unintuitive: the documentation explains that replaceWith() returns the "the JQuery element that was just replaced, which has been removed from the DOM".)
The patch does two things:
response.messages). This is completely unrelated to the bug described here, but I can't provide it in a separate patch because these two patches will collide. This feature, of displaying the messages, could prevent in the future bugs such a this.| Comment | File | Size | Author |
|---|---|---|---|
| attachbehaviors.diff | 1.18 KB | mooffie |
Comments
Comment #1
mooffie commentedTwo notes:
$('.view', context)doesn't match when context itself is the desired element.Comment #2
merlinofchaos commentedWell all right then. Looks good to me. Committed!
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.