When you close the toolbar drawer, and the overlay is not enabled, you get a JS error. This is due to some boneheaded code written by someone whom I will not name but who baked cookies with my daughter last night. Patch forthcoming.

CommentFileSizeAuthor
#1 654558-toolbar-toggle.patch680 bytesksenzee

Comments

ksenzee’s picture

Title: JS error when closing toolbar drawer » toolbar drawer toggle is broken
Status: Active » Needs work
StatusFileSize
new680 bytes

Hm. Trying to fix this, I uncovered a slightly bigger problem. Under normal circumstances, you can't click on links outside a modal dialog. We have a click event on toolbar links that circumvents that restriction with a simple window.location.href = this.href. Unfortunately, that breaks down for links like the toolbar drawer toggle, that aren't intended to go anywhere. Normally for that type of link you just return false from a click event handler, and that keeps the native click event from happening. But it doesn't stop our simulated click event from happening. So when you click on the toolbar drawer toggle, you get the correct JS behavior where the drawer slides shut -- and then a second later your whole page reloads, which is decidedly not what you were expecting.

I'm attaching a patch to fix the boneheaded JS error, but the bigger problem is unsolved. We need a better way to circumvent the modal dialog for toolbar links, and I haven't dug into jQuery UI Dialog enough to know exactly what that would be.

David_Rothstein’s picture

Status: Needs work » Reviewed & tested by the community

This patch makes sense.

Isn't the other problem handled by #650832: Closing the shortcuts bar destroys the overlay?

ksenzee’s picture

Yes, it is. So this is good to go.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.