fix(nav): portal publish menu so chip cannot stretch
Move multi-type 发布 menu to document.body with fixed positioning; chip uses fit-content only and never inherits the 168px menu width.
This commit is contained in:
@@ -185,13 +185,12 @@ if (!function_exists('aksrt_render_new_add_btns')) :
|
||||
. '</a>';
|
||||
}
|
||||
|
||||
$html = '<span class="' . esc_attr(trim(implode(' ', $wrap_tokens) . ' hover-show')) . '">';
|
||||
// type=button keeps focus without navigating; avoids link min-width quirks.
|
||||
$html .= '<button type="button" class="' . esc_attr(trim('but newadd-btns__toggle navbar-cta ' . $cta_class)) . '">'
|
||||
// data-aksrt-newadd: JS portals the menu to body so chip width cannot track menu.
|
||||
$html = '<span class="' . esc_attr(trim(implode(' ', $wrap_tokens) . ' hover-show')) . '" data-aksrt-newadd="1">';
|
||||
$html .= '<button type="button" class="' . esc_attr(trim('but newadd-btns__toggle navbar-cta ' . $cta_class)) . '" aria-haspopup="menu" aria-expanded="false">'
|
||||
. $label_html
|
||||
. ' <i class="fas fa-caret-down" aria-hidden="true"></i></button>';
|
||||
// Sibling dropdown (not a flex child of the painted chip).
|
||||
$html .= '<div class="hover-show-con drop-newadd" role="menu">';
|
||||
$html .= '<div class="hover-show-con drop-newadd" role="menu" hidden>';
|
||||
foreach ($actions as $a) {
|
||||
$html .= '<a rel="nofollow" class="newadd-btns__item" role="menuitem" href="' . esc_url($a['url']) . '">';
|
||||
$html .= '<i class="' . esc_attr($a['icon']) . '" aria-hidden="true"></i> '
|
||||
|
||||
Reference in New Issue
Block a user