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

IconButton close css on header dialog misaligned with its icon #384

Open
ahmadshiddiqn opened this issue Jan 6, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@ahmadshiddiqn
Copy link

Describe the bug
The CSS of close IconButton (hover and focus state) is misaligned with the icon on the header dialog full screen when the dialog is default opened. But when clicked or browser size changed, it fixed by itself.

To Reproduce
Steps to reproduce the behavior:

  1. Use Full Dialog example code
  2. Change open variable to true instead of false (line 39)
  3. See error

Expected behavior
Same as the example when the dialog is opened through button click
image

Screenshots
image
(The close button is also autofocused without any action or hardcoded)

Desktop (please complete the following information):

  • OS: Windows 10 Pro 64-bit (Version 20H2, Build Ver: 19042.1415)
  • Browser: Edge (Version 96.0.1054.62 (Official build) (64-bit))
@ahmadshiddiqn ahmadshiddiqn added the bug Something isn't working label Jan 6, 2022
@jdgamble555
Copy link

jdgamble555 commented Feb 5, 2022

This is same problem in all browsers: Chromium, Mozilla, etc.

Any workarounds?

I was able to get the X button aligned upon regular view, but not when the media query is active (small resolutions):

<IconButton style="position: absolute; top: 0; right: 0;" action="close" class="material-icons">close</IconButton>

J

@bcazur
Copy link

bcazur commented Sep 14, 2022

@jdgamble555 - found a weird workaround: setting ripple={false} seems to work for the misaligned positioning of the ripple on hover. But it does still get focus when opening the modal dialog.

<IconButton ripple={false} action="close" class="material-icons">close</IconButton>

@hperrin - any suggestions or ETA? This bug has been opened since Jan (8 months already). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants