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

[Dropdown] Little css issue with edge and sub-submenus dropdown icon #1071

Open
Ikaer opened this issue Oct 7, 2019 · 10 comments
Open

[Dropdown] Little css issue with edge and sub-submenus dropdown icon #1071

Ikaer opened this issue Oct 7, 2019 · 10 comments
Labels
browser/edge Any issues relating to Microsoft Edge (old none chromium version) browser/ie Any issues relating to Internet Explorer browser/safari Any issues relating to Apple Safari lang/css Anything involving CSS state/has-pr An issue which has a related PR open tag/help-wanted Issues which need help to fix or implement type/bug Any issue which is a bug or PR which fixes a bug

Comments

@Ikaer
Copy link

Ikaer commented Oct 7, 2019

Bug Report

Steps to reproduce

  1. Use the jsfiddle

Expected result

Sub-submenus should have correct dropdown icon position

Actual result

Dropdown icon is below the text of item

Testcase

https://jsfiddle.net/jxwhk10m/ (to open with Edge to reproduce the issue)
NB: my edge at the time was:
Microsoft Edge 42.17134.1038.0
Microsoft EdgeHTML 17.17134

Screenshot (when possible)


image

Version

2.7.8

Workaround:
I fixed it using the following css rule, but I'm not sure its a good thing to do::
https://jsfiddle.net/jxwhk10m/1/

.ui.menu .ui.dropdown .menu > .item{
  display:flex !important;
}

@y0hami y0hami added type/bug Any issue which is a bug or PR which fixes a bug browser/edge Any issues relating to Microsoft Edge (old none chromium version) lang/css Anything involving CSS browser/safari Any issues relating to Apple Safari labels Oct 7, 2019
@y0hami
Copy link
Member

y0hami commented Oct 7, 2019

This is also an issue on Safari (12.1 latest) and IE (11)

Edge:
image

IE:
image

Safari:
image

Tested all major browsers with BrowserStack and only these 3 seem to have the issue.

@y0hami y0hami added this to the 2.8.x milestone Oct 7, 2019
@Ikaer
Copy link
Author

Ikaer commented Oct 7, 2019

The problem also appears in dropdown menu, not just menu.
image

This is an example of the issue: https://jsfiddle.net/kz9wrdh4/
The workaround: https://jsfiddle.net/zda1ocnt/

This workaround is more general and work for both cases (initial issue and this one)
https://jsfiddle.net/7zdvbjec/

.ui.dropdown .menu > .item{ display:flex !important; }

@Ikaer
Copy link
Author

Ikaer commented Oct 7, 2019

So my workaround introduces some new problems:
image

Dropdown icon are not at the end of the item.

So I will let you find a proper solution guys :)

Thanks.

@lubber-de
Copy link
Member

🤔 That was fixed at least for IE11 by #339 in 2.7.2
But even when using v2.7.2 today it's not working anymore...Seems like there have been updates for the browsers making this old change incompatible again.
Basically the reason for the mentioned browsers is lack of support for min-width: max-content

@lubber-de lubber-de added browser/ie Any issues relating to Internet Explorer tag/help-wanted Issues which need help to fix or implement Hacktoberfest Issues for Hacktoberfest! labels Oct 8, 2019
@rkomiyama
Copy link
Contributor

Why not just use flexbox instead of using floats? I've implemented a solution, but it would require modifying any existing HTML.

@lubber-de
Copy link
Member

@rkomiyama Could you provide a jsfiddle with your solution?

@rkomiyama
Copy link
Contributor

rkomiyama commented Oct 22, 2019

Actually, I found a way to provide enough specificity to get around the !important tag.

https://jsfiddle.net/14o6wm90/

div.ui.menu div.ui.dropdown.item div.menu > div.ui.dropdown.item {
  display:flex;
}

I've tested this in Safari and it works. JSfiddle doesn't work in IE11, so I won't be able to test it in Edge until later today.

If this is an acceptable solution, I would like to put up a PR for it :)

@lubber-de
Copy link
Member

lubber-de commented Oct 22, 2019

@rkomiyama well, beside the remove of !important
The result is already the same as suggested by @Ikaer before here #1071 (comment)

@lubber-de
Copy link
Member

If you can also fix the icon position issue, then go for a PR 🙂

rkomiyama added a commit to rkomiyama/Fomantic-UI that referenced this issue Oct 22, 2019
Adds some styling to ensure that the dropdown icon in the submenu items will stay vertically aligned and to the right.

Closes fomantic#1071
@lubber-de lubber-de added the state/has-pr An issue which has a related PR open label Oct 23, 2019
@lubber-de lubber-de removed the Hacktoberfest Issues for Hacktoberfest! label Oct 31, 2019
@lubber-de
Copy link
Member

At least @Ikaer Example (which was also broken in chrome) is fixed now by #1838
https://jsfiddle.net/lubber/3b19owde/2/

@lubber-de lubber-de removed this from the 2.8.x milestone Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser/edge Any issues relating to Microsoft Edge (old none chromium version) browser/ie Any issues relating to Internet Explorer browser/safari Any issues relating to Apple Safari lang/css Anything involving CSS state/has-pr An issue which has a related PR open tag/help-wanted Issues which need help to fix or implement type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

4 participants