From b9cc39839695ecb73e9fc02f1e584fc991b946b3 Mon Sep 17 00:00:00 2001 From: Linus Metzler Date: Sun, 26 Aug 2012 22:36:30 +0300 Subject: [PATCH] fixed dropdown bug when a dropdown parent contains a link itself, a data-target="#" is needed --- lib/cleanup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cleanup.php b/lib/cleanup.php index 9b565e8..ad0a6d3 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -471,7 +471,7 @@ class Roots_Nav_Walker extends Walker_Nav_Menu { $attributes .= ! empty($item->target) ? ' target="' . esc_attr($item->target ) .'"' : ''; $attributes .= ! empty($item->xfn) ? ' rel="' . esc_attr($item->xfn ) .'"' : ''; $attributes .= ! empty($item->url) ? ' href="' . esc_attr($item->url ) .'"' : ''; - $attributes .= ($args->has_children) ? ' class="dropdown-toggle" data-toggle="dropdown"' : ''; + $attributes .= ($args->has_children) ? ' class="dropdown-toggle" data-toggle="dropdown" data-target="#"' : ''; $item_output = $args->before; $item_output .= '';