jQuery is dropping $.swap in version 3 and we use it in jquery.intrinsic.js.

We should not use swap and manage that on our own.

CommentFileSizeAuthor
#3 jquery-dropping-swap-2474041-3.patch1.56 KBcolorfield

Comments

nod_’s picture

Issue tags: +JavaScript
colorfield’s picture

Assigned: Unassigned » colorfield
colorfield’s picture

Assigned: colorfield » Unassigned
StatusFileSize
new1.56 KB

A trivial solution, any clue on how to reduce the overhead without refactoring the client (e.g. core/themes/seven/js/nav-tabs.js)?

Besides the fact that this has been undocumented, it's a real performance killer because it can cause two reflows of the affected regions. Generally it's better to do the bookkeeping of visibility yourself (e.g. via a data item or class name) so the browser won't have to do all that work.

dmethvin

colorfield’s picture

Issue tags: +drupaldevdays
nod_’s picture

Status: Active » Needs work

Ugh, that's a really ugly way to figure out size. I'd hoped there was a better way than messing with the body and all.

Is it possible to look into it and check whether we absolutely have to mess with the body? While doing that keep in mind we're looking at IE9+. If there is no other way, I guess we can go with #3.

droplet’s picture

nod_’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2474041: jQuery dropping $.swap(), replace it with custom code.

Fantastic.