Problem/Motivation
Steps to reproduce
Enable Settings tray module
Visit a non-admin page
Open the "Shortcuts" tray from the toolbar.
Click "Edit" in the toolbar to enter Editing mode.
The Shortcuts tray disappears but there is black area left.
Proposed resolution
Close all toolbar trays when entering edit mode.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | 2821263-23.patch | 606 bytes | droplet |
| #22 | 2821263-22.patch | 523 bytes | tedbow |
| #14 | 2821263-14.patch | 570 bytes | tedbow |
| #6 | 2821263-6.patch | 4.86 KB | tedbow |
| #6 | 2821263-6-TESTS_ONLY.patch | 3.8 KB | tedbow |
Comments
Comment #2
tedbowOk here is patch that closes any open toolbar item
If anybody is wondering why I am breaking up the #id based selector here:
$('#toolbar-bar').find('.toolbar-tab').has('.toolbar-tray.is-active').find('.toolbar-item').click();It seems it is much faster: https://learn.jquery.com/performance/optimize-selectors/#id-based-selectors
Comment #3
tedbowOk this patch does
Comment #4
GrandmaGlassesRopeManTested this and it works. Great job @tedbow
Comment #5
cilefen commentedComment #6
tedbowReuploaing patch with a TESTS ONLY version.
Comment #8
tedbowSetting back to RTBC. #6 was just to upload the test only patch.
The other patch is the exact same as #3.
Comment #11
xjmThanks @tedbow. I also tested the fix manually and confirmed that both the shortcuts and the admin menu have the same behavior now.
Committed d2effbc and pushed to 8.3.x and 8.2.x. Thanks!
Comment #12
nod_If it changes a JS file it needs to have the JavaScript tag.
Comment #13
nod_We never use click on a jQuery object, always use
.trigger('click'). The only time we use click() is on DOM objects.Also if we can use CSS selectors, we should
Comment #14
tedbowOk here is fix.
Comment #16
tedbowI made mistake on #14 it did not actually have any test changes because the were already committed in #9 and #10.
Just need a review on the same JS change for #14
Comment #17
GrandmaGlassesRopeMan@tedbow
This looks good and addresses the feedback from #13.
This
.trigger()could probably be on its own line to match the rest of the chaining style, but only a very minor nit.Comment #19
tedbowRandom test failure,ArgumentPlaceholderUpdatePathTest, back to RTBC, rinse and repeat ;)
Comment #21
tkoleary commentedComment #22
tedbowJust a re-roll
This line was updated in another commit so not needed.
Comment #23
droplet commentedI can't reproduce the problem it described but to close the tray should be this way I think.
Comment #25
tedbow@droplet yes the issue was committed in #9.
It was re-opened to address @nod_'s comment in #13
Thanks for your improvement!
I am going to make a follow up for your fix which looks better. Because it confusing to keep this issue open when it is fixed.
Comment #26
tedbowWhoops didn't mean to upload the patch in the last comment. Here is the new issue #2843901: Settings tray should use toolbar models to close the toolbar items
Comment #30
tedbowChanging to new settings_tray.module component. @drpal thanks for script help! :)