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

[FlatButton] containerElement broken in Chrome for userAgent: 'all' #3129

Closed
prashaantt opened this issue Feb 1, 2016 · 4 comments · Fixed by #3303
Closed

[FlatButton] containerElement broken in Chrome for userAgent: 'all' #3129

prashaantt opened this issue Feb 1, 2016 · 4 comments · Fixed by #3303
Labels
component: button This is the name of the generic UI component, not the React module!

Comments

@prashaantt
Copy link

My code looks like

<FlatButton label="About" buttonLink={ true } containerElement={ <Link to='/about' /> } />

where Link is a react-router Link element, but using HTML <a/> tags has the same visual effect:

image

While trying to predictably theme my MUI in a universal app according to #3009, I need to set the userAgent to 'all' for best results. This is breaking the styling of this FlatButton for me in Chrome (works well in Safari and FF):

export default themeDecorator(ThemeManager.getMuiTheme(myTheme, { userAgent: 'all' }))(App);

The output with this setting is:

image

Chrome somehow doesn't like userAgent: 'all'.

EDIT: Linked to the right pull request.

@prashaantt
Copy link
Author

Oh, in case it matters what myTheme is, it's just an attempt to override the default font:

const myTheme = {
    fontFamily: 'Helvetica'
};

Is there something else I need to do to make this override proper? This works perfectly in a client-side environment, but I see the above issue with the button when doing SSR, because I can't determine at server startup (before any request comes in) what the userAgent will be and so have to set it to all.

@mbrookes mbrookes changed the title FlatButton with containerElement broken in Chrome for userAgent: 'all' [FlatButton] containerElement broken in Chrome for userAgent: 'all' Feb 2, 2016
@antoinerousseau
Copy link
Contributor

I have the same issue since I upgraded from 0.14.3 to 0.14.4... client side

@andeero
Copy link

andeero commented Feb 10, 2016

Same here. Broken in 0.14.2 and 0.14.4, but working in 0.14.3. Client-side.

@antoinerousseau
Copy link
Contributor

I notices that when passing a link (<a>), it gets a -webkit-appearance:button style, and if I manually remove it, the problem is resolved...
What is adding this rule?

@zannager zannager added the component: button This is the name of the generic UI component, not the React module! label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants