Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
file system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Jan 2014 at 08:29 UTC
Updated:
29 Jul 2014 at 23:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
droplet commentedit removes all events in .fileValidate namespace (Of course, mostly it's fine)
Other code looks good to me.
Comment #2
nod_Considering the attach behavior kinda owns the .fileValidate namespace I'd say it's fine for the detach to remove all of them. That way if contribs hooks into that they don't need to care about clean-up (since they hardly care about it anyway).
Where my reasoning breaks down is when I left the
Drupal.file.validateExtensionin there. jQuery is supposed to only remove event handlers using the namespace and the validateExtension function.So either
+ .off('.fileValidate');or
+ .off('change.fileValidate');Not sure I care much, what's your take on it?
Comment #3
nod_Let's go with:
+ .off('change.fileValidate');Comment #4
javisr commentedMade the change suggested in #3.
Comment #5
javisr commentedOps, now these are the valid ones
Comment #8
droplet commentedComment #9
nod_This is a reroll because the indentation standard changed for JavaScript files. No need for commit credit because of this reroll.
Comment #10
webchickCommitted and pushed to 8.x. Thanks!
Comment #11
droplet commented@nod_ rerolled Patch #0 and apply the Comment #5 interdiff changes. BUT comment #5 interdiff.txt do not reflect the facts :S
Comment #12
nod_Right that's an oversight, the patch fixes a JSHint error as well (unused variable).
Comment #13
alexpottCommitted f6e6e52 and pushed to 8.x. Thanks!
Comment #15
lmeurs commentedClient side file validation still seems broken due to Drupal's unique ID's that are being used for selectors, see #2235977: JS Client-side file validation is broken (because ajaxPageState is broken?).