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

[Form] Native drop-down selection in error field has inconsistent size #576

Closed
ko2in opened this issue Mar 21, 2019 · 2 comments
Closed
Assignees
Labels
lang/css Anything involving CSS type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@ko2in
Copy link
Member

ko2in commented Mar 21, 2019

Bug Report

The native drop-down selection within field error has inconsistent size and changing it's width and height when the mouse focus somewhere on the page. It also causes the other component around being inconsistent in the page.

Steps to reproduce

  1. Add field container with <select> in it. The select element shouldn't have special drop-down class ui dropdown.
  2. Manipulate the field container to have error class, or add error class manually.
  3. Now, click the <select> element and then click somewhere on the page

Expected result

The drop-down should react as naturally.

Actual result

The drop-down changes it's width and height and moves itself obviously and other components around.

Testcase

https://jsfiddle.net/nr7sgu5f/

Screenshot

Select

Version

2.7.2

@y0hami y0hami added type/bug Any issue which is a bug or PR which fixes a bug lang/css Anything involving CSS tag/help-wanted Issues which need help to fix or implement tag/good-first-issue Good issues for new starters to try labels Mar 21, 2019
@y0hami y0hami added this to the 2.7.4 milestone Mar 21, 2019
@y0hami
Copy link
Member

y0hami commented Mar 21, 2019

This seems to be due to the error state changing the padding or something once the element is focused.

@ko2in
Copy link
Member Author

ko2in commented Mar 21, 2019

This causes by the following CSS.

.ui.form .field.error input:not([type]):focus, .ui.form .field.error input[type=date]:focus, .ui.form .field.error input[type=datetime-local]:focus, .ui.form .field.error input[type=email]:focus, .ui.form .field.error input[type=file]:focus, .ui.form .field.error input[type=number]:focus, .ui.form .field.error input[type=password]:focus, .ui.form .field.error input[type=search]:focus, .ui.form .field.error input[type=tel]:focus, .ui.form .field.error input[type=text]:focus, .ui.form .field.error input[type=time]:focus, .ui.form .field.error input[type=url]:focus, .ui.form .field.error select:focus, .ui.form .field.error textarea:focus {
    background: #fff6f6;
    border-color: #e0b4b4;
    color: #9f3a38;
    -webkit-appearance: none; 
    -webkit-box-shadow: none;
    box-shadow: none;
}

Maybe, it's safe to remove -webkit-appearance: none? I'm not sure how much it can effect to the other usages.

@lubber-de lubber-de modified the milestones: 2.7.4, 2.7.5 Apr 2, 2019
@lubber-de lubber-de removed tag/good-first-issue Good issues for new starters to try tag/help-wanted Issues which need help to fix or implement labels Apr 9, 2019
@exoego exoego added the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Apr 12, 2019
exoego pushed a commit to exoego/Fomantic-UI that referenced this issue Apr 30, 2019
…h :focus from error field

The property `-webkit-appearance: none` causes the select element unstable on focus and unfocus
events. Removing native appearance from select on focus reduces the space between the border
and it's content which causes unexpected bouncing.

This property doesn't give any extra effect to all fields for focus event, but making select
element inconsistency alone. So, better to remove this property to make the select element stable
along with the other fields when it's focused or unfocused.

Closes fomantic#576
@y0hami y0hami closed this as completed in 63cbf2d May 16, 2019
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS 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