Closed (fixed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
settings_tray.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Nov 2016 at 21:20 UTC
Updated:
30 Aug 2017 at 20:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tedbow@samuel.mortenson thanks for the patch!
Looks good to me
Comment #3
tim.plunkettCan't see from the patch but is this in Drupal.behaviors? That's already bound to document.ready.
If that's still not enough, we have a dedicated domready library to use
Comment #4
samuel.mortensonNo, I believe this was outside a behavior, which is likely why it was being bound early. I can either use jQuery.once to bind the event one time in a Drupal behavior, or use a different domready library. What is the dedicated library?
Comment #5
devin carlson commentedA reroll of the original patch.
Comment #7
tedbowOk, this patch using attach behaviors.
@tim.plunkett I wasn't sure how to use the drupal specific dom ready library.
@samuel.mortenson if could test it on the local setup that was breaking that would be great.
Comment #8
samuel.mortensonIt looks like this patch is working for me, but could this event be bound multiple times if Drupal.attachBehaviors() is called multiple times? Should we use jQuery.once?
Comment #9
tedbow@samuel.mortenson yep. fixed
Comment #10
tkoleary commentedComment #11
droplet commentedMake it more consistency if we can.
If not, can we jot a comment there to avoid another same request in the future :)
Comment #12
GrandmaGlassesRopeManSome explanation added for #11.
Comment #13
tedbowI think this makes clear why we are using the "." here and not just "offcavnas"
Comment #14
tedbowOk. RTBC. The randomness of this issue doesn't so it doesn't seem like we can add a test for it.
Comment #15
webchickAgreed that a test won't actually work in this context. Looks like @droplet's feedback was addressed.
Committed and pushed to 8.4.x and backported to 8.3.x, thanks!
Comment #17
webchickComment #20
tedbowChanging to new settings_tray.module component. @drpal thanks for script help! :)