From 44b16bdb5da56a99629c6da8365d0c65a77d4bb6 Mon Sep 17 00:00:00 2001 From: Mohammad Younes Date: Mon, 16 Dec 2013 21:22:22 +0300 Subject: [PATCH] Fix Menu dropdowns not closing in IE11 #409 --- src/modules/transition.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/transition.js b/src/modules/transition.js index d5d03aeb3..4b0e07c7f 100755 --- a/src/modules/transition.js +++ b/src/modules/transition.js @@ -170,11 +170,14 @@ $.fn.transition = function() { var fakeAssignment = element.offsetWidth; if (removeThenAdd) { var parent = $module.parent(); + //element not attached yet. + if (parent.length == 0) + return; var next = $module.next(); if (next.length == 0) $module.detach().appendTo(parent); else - $module.detach().before(next); + $module.detach().insertBefore(next); } },