Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no font-awesome icons visible in submenu [fix included] #659

Closed
betafritz opened this issue Aug 2, 2018 · 6 comments
Closed

no font-awesome icons visible in submenu [fix included] #659

betafritz opened this issue Aug 2, 2018 · 6 comments
Labels

Comments

@betafritz
Copy link

I´m using font-awesome icons in my contextmenus. when you hover the item that has the submenu as child, the icon-color changes to white (#fff). that´s because you than can see the top item icon even when its has now the hover color. But that also changes the items color in the submenu to white so they are not visible.
contextmenu

so to fix that you must enter a ">" in the css rule (line 171 in jquery.contextMenu.css v2.7.0):

.context-menu-icon.context-menu-icon--fa5.context-menu-hover > i,.context-menu-icon.context-menu-icon--fa5.context-menu-hover svg {

    color: #fff

}

I haven´t check on the svg item. but i guess there should be a > too.

@bbrala
Copy link
Member

bbrala commented Aug 10, 2018

When i try to reproduce this i see the icons without a problem, with the SVG and CSS version of font-awesome 5. What browser are you using?

@EddieAguirre
Copy link

I'm having a similar or the same issue. In my case the icons in the submenu appear as expected until I add an icon to the submenu selector (the item that displays the submenu).

Below is the output when the submenu selector item doesn't have an icon.
screen shot 2018-09-11 at 12 13 52 pm

Below is after adding the submenu selector icon, the submenu icons disappear.
screen shot 2018-09-11 at 12 14 16 pm

And the same as above while hovering over a submenu item. You can see the icon is there it just doesn't show until hovered.
screen shot 2018-09-11 at 12 14 22 pm

I'm using Font Awesome as well.

var tmpItems = { "Hello": { "name": "Hello", "icon": "fas fa-columns", }, "fold1": { "name": "Columns", "icon": "fas fa-columns", "items": tmpColumnItems, }, };

@klues
Copy link

klues commented Oct 2, 2018

had the same problem. in jquery.contextMenu.css just instead this:

.context-menu-icon.context-menu-icon--fa5.context-menu-hover i, .context-menu-icon.context-menu-icon--fa5.context-menu-hover svg {
  color: #fff;
}

use:

.context-menu-icon.context-menu-icon--fa5.context-menu-hover > i, .context-menu-icon.context-menu-icon--fa5.context-menu-hover > svg {
  color: #fff;
}

So the > only applies to direct childs and makes the icon white for them (because background of selected items is blue). Other childs remain unaffected and the icons remain blue.

looks like this in my project: http://prntscr.com/l17i3g

@klues
Copy link

klues commented Oct 2, 2018

for fixing the issue for release the SASS rule in https://github.com/swisnl/jQuery-contextMenu/blob/master/src/sass/jquery.contextMenu.scss#L62 would have to be changed so that only direct childs are affected.

klues added a commit to asterics/AsTeRICS-Grid that referenced this issue Oct 2, 2018
@klues
Copy link

klues commented Oct 2, 2018

oh, sorry, did not see that @betafritz also proposed the solution... only saw that the issue is still open.

@bbrala bbrala closed this as completed in 067f481 Oct 2, 2018
@bbrala
Copy link
Member

bbrala commented Oct 2, 2018

Sorry for the delay, a fix has been published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants