Opened 10 years ago
Closed 9 years ago
#8594 closed bug (notabug)
bottom line of selected item in autocomplete dropdown is invisible if backgound image applied to <a/> element
Reported by: | deng.hui5 | Owned by: | deng.hui5 |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.autocomplete | Version: | 1.9.0-rc.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
CSS:
.ui-menu a.test{ background: white url('/a/b/icon16.png') no-repeat; padding-left: 16px; }
JS:
$(this).data( "autocomplete" )._renderItem = function( ul, item ) { return $( "<li></li>" ) .data( "item.autocomplete", item ).append( "<a class=test>" + item[code] + "</a>" ).appendTo( ul );
Change History (6)
comment:1 Changed 10 years ago by
Owner: | set to deng.hui5 |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
Status: | pending → new |
---|
I find <a> element in dropdown menu use margin:-1px to reserve space for border of focused item. so I change it to:
.ui-menu a{ margin:1px 0px 0px; } .ui-menu a.ui-state-focus{ margin:0px; }
seems fixing this bug.
comment:3 Changed 10 years ago by
Milestone: | 1.9.0 → 1.10.0 |
---|
comment:4 Changed 10 years ago by
Status: | new → open |
---|
comment:5 Changed 10 years ago by
Milestone: | 1.10.0 → none |
---|
comment:6 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | open → closed |
We no longer use anchors in the menu items, so this is purely a custom rendering issue now.
Note: See
TracTickets for help on using
tickets.
If you're using a custom render method, I'm not sure what you want us to do. At a minimum we need a reduced test case showing the problem.