Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2011 at 13:13 UTC
Updated:
29 Jul 2014 at 19:19 UTC
The problem is this line:
$('form table:has(th.select-all)', context).once('table-select', Drupal.tableSelect);
When the table is updated with #ajax, context is form and therefore, it doesn't find the table anymore.
Removing the form part fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| fix_tableselect_with_ajax.patch | 411 bytes | berdir |
Comments
Comment #1
berdirOh, this is btw. another bug discovered by Privatemsg: #1021328: Using AJAX Actions breaks sorting of messages :)
Comment #2
rfaysubscribe
Comment #3
sunThanks!
To clarify:
When adding #ajax on a table or an element in a table, then the
contextthat the AJAX framework creates is theformDOM element itself. Therefore, the selectorcannot match the table, because
form == context, soformcannot be found within context.Comment #4
BenK commentedSince I was involved in reporting the original Privatemsg issue, I thought I'd chime in. The patch totally solves the problem for me. So I agree this is RTBC.
--Ben
Comment #5
dawehnerComment #6
dries commentedCommitted to 8.x and 7.x. Thanks.
Comment #7
bfroehle commentedUntagging since it's been committed to 7.x