Opened 8 years ago
Closed 8 years ago
#37575 closed defect (bug) (fixed)
Customizer Menus: css selector missing when adding custom link
Reported by: | virgodesign | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Customize | Keywords: | has-patch |
Focuses: | Cc: |
Description
While in customizer, if you are populating a navigation menu and you add a custom link to the menu, a new item is created and added with an initial wrong css selector.
Usually, when a user add a new item to a menu, the added item has the following css selector:
menu-item-{post_type}
But when you add a custom link, the added item has the selector menu-item-
instead of menu-item-custom
.
This issue happens only during the creation of a custom link. All Previously created custom link items (loaded during customizer initialization) has the correct css selector: menu-item-custom.
This could appear as a not so important problem, but could brings to strange behaviour and style inconsistency.
Attachments (3)
Change History (9)
#1
@
8 years ago
Ok then quick review for Core Committers
,
Checked customize-nav-menus.js
Line no 1323
where we add class 'menu-item-' + settingValue.object
, But the thing is that when custom menu link add to menu _submitLink()
is called which is internally call submitLink()
Then in submitLink()
there are one menuItem
variable which 'object': ''
, but at that place we need to replace 'object': 'custom'
sting in place of null string.
So that in 'menu-item-' + settingValue.object
which will generate class name as menu-item-custom
Let me know if anything still needed.
Thanks.
Wrong CSS selector in custom link while in Menu customizer