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

Button: Added check to adjust icon position in browsers that do not follow the standard box model when displaying buttons (i.e. Firefox). Fixed #5603 #328

Closed
wants to merge 1 commit into from

Conversation

kborchers
Copy link
Member

Button: Added check to adjust icon position in browsers that do not follow the standard box model when displaying buttons (i.e. Firefox). Fixed #5603 - Button with icon not displayed correctly in Firefox when button has css height.

…ollow the standard box model when displaying buttons (i.e. Firefox). Fixed #5603 - Button with icon not displayed correctly in Firefox when button has css height.
@kborchers
Copy link
Member Author

This is still not perfect but it is better than the current icon display. If the button text wraps to multiple lines due to a set width, the icon aligns with the first line in FF but otherwise, all browsers properly align the icon.

@gnarf
Copy link
Member

gnarf commented Jul 19, 2011

Not really sure if we need this, can you look into http://bugs.jqueryui.com/ticket/5603#comment:6 and let me know if that works to fix the issue / maybe put together a pull based on my investigations?

@kborchers
Copy link
Member Author

I want to say I tried that and it didn't work in a situation in FF where the width was set and the text in the button was longer so it wrapped. That caused unexpected positioning of the text. My solution, though not perfect was the only thing I could come up with that consistently positioned the text in all browsers, though FF was still different than the others, it was consistent.

@mikesherov
Copy link
Member

@kborchers, @gnarf37 where are we at with this PR?

@mikesherov
Copy link
Member

couldn't this be fixing by changing the box-sizing css property of the button to content-box? Also, in jQuery 1.8, I made .height() always return the content height, respecting box sizing. @kborchers, thoughts?

@mikesherov
Copy link
Member

Actually, this was fixed in Firefox 10! Closing. If I'm wrong, reopen. Thanks guys!

@mikesherov mikesherov closed this Nov 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants