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

fix(Input): enhance vertical centering for Safari #1469

Merged
merged 1 commit into from Jun 20, 2022

Conversation

tujoworker
Copy link
Member

@tujoworker tujoworker commented Jun 20, 2022

This change should not influence Firefox or Chromium based browser, but enhance Safari (Webkit based browsers).

It fixes an issue occurred in PR #1467

Image from iOS

@tujoworker tujoworker requested a review from langz June 20, 2022 09:47
@tujoworker tujoworker changed the title fix(Input): enhance vertical centering for Safari (mainly iOS) fix(Input): enhance vertical centering for Safari Jun 20, 2022
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 20, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3cc71a5:

Sandbox Source
eufemia-starter Configuration

@gatsby-cloud
Copy link

gatsby-cloud bot commented Jun 20, 2022

Gatsby Cloud Build Report

DNB Eufemia Portal

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 10m

Performance

Lighthouse report

Metric Score
Performance 🔶 67
Accessibility 💚 100
Best Practices 💚 100
SEO 💚 92

🔗 View full report

Copy link
Contributor

@langz langz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems good ✅
I tried comparing https://eufemia.dnb.no/uilib/components/autocomplete#default-autocomplete vs running this branch locally, both in Safari, but wasn't able to see any difference. I might be looking at the "wrong" demo/example though 🙏

@tujoworker
Copy link
Member Author

Code seems good ✅ I tried comparing https://eufemia.dnb.no/uilib/components/autocomplete#default-autocomplete vs running this branch locally, both in Safari, but wasn't able to see any difference. I might be looking at the "wrong" demo/example though 🙏

Yeah, its mainly a iOS Safari issue. There we need the system in order to set our root font-size (for auto sizing when the users has defined a larger font-size) – but the default system font-size on iOS is 17px and not 16px like on all other browsers.

The fix:
Screenshot 2022-06-20 at 14 00 53

Before:
Screenshot 2022-06-20 at 14 01 52

@langz
Copy link
Contributor

langz commented Jun 20, 2022

Code seems good ✅ I tried comparing https://eufemia.dnb.no/uilib/components/autocomplete#default-autocomplete vs running this branch locally, both in Safari, but wasn't able to see any difference. I might be looking at the "wrong" demo/example though 🙏

Yeah, its mainly a iOS Safari issue. There we need the system in order to set our root font-size (for auto sizing when the users has defined a larger font-size) – but the default system font-size on iOS is 17px and not 16px like on all other browsers.

The fix: Screenshot 2022-06-20 at 14 00 53

Before: Screenshot 2022-06-20 at 14 01 52

Aha, thanks for explaining 👍

@tujoworker tujoworker merged commit dadb5f8 into main Jun 20, 2022
@tujoworker tujoworker deleted the fix/safari-centering branch June 20, 2022 12:57
tujoworker pushed a commit that referenced this pull request Jun 23, 2022
# [9.27.0](v9.26.1...v9.27.0) (2022-06-23)

### Bug Fixes

* always hide content from DOM when Accordion is collapsed ([41cbd9b](41cbd9b))
* **Autocomplete:** enhance VoiceOver support ([#1472](#1472)) ([f469dd8](f469dd8))
* **Autocomplete:** ensure "no options" is read out in aria-live ([#1471](#1471)) ([254303f](254303f))
* **Autocomplete:** fix using tab + write issue ([#1473](#1473)) ([73f9655](73f9655))
* **Autocomplete:** make VoiceOver announce first if a certain item is selected ([#1479](#1479)) ([d32e980](d32e980))
* **Autocomplete:** touch device issue on first focus ([#1476](#1476)) ([5fcbf17](5fcbf17))
* **Avatar:** properly handle spacing props ([5841990](5841990))
* **Breadcrumb:** properly handle spacing props ([b713dad](b713dad))
* **DatePicker:** make keyboard usage in input not throw ([#1475](#1475)) ([d0756e2](d0756e2))
* **DatePicker:** rename testing attributes to data-testid ([2e1e285](2e1e285))
* **Dialog:** fix Modal backdrop / overlay false-positive click issue while e.g. selecting ([#1463](#1463)) ([91e69a8](91e69a8))
* **Dialog:** fix Safari issue not able to scroll ([3f6fb31](3f6fb31))
* **Dialog:** make Dialog not overflow iOS Safari viewport ([764e487](764e487))
* **Dropdown:** Missing properties in PropTypes ([#1384](#1384)) ([7a83b38](7a83b38))
* **HeightAnimation:** ensure quick state changes to react without animating from start to finish ([886b4cd](886b4cd))
* **HelpButton:** Adds test when used inside texts ([#1404](#1404)) ([f8a7795](f8a7795))
* **Icon:** fix stopwatch icon (16px) ([d57c617](d57c617))
* **Input:** add missing Input test for icon and clear button ([#1465](#1465)) ([be2b4a0](be2b4a0))
* **Input:** enhance vertical centering for Safari (mainly iOS) ([#1469](#1469)) ([dadb5f8](dadb5f8))
* **InputMasked:** fix integerLimit option when used with decimals ([14fe5d9](14fe5d9))
* **Modal:** fix data-testid usage in object defined props ([e023f13](e023f13))
* **Modal:** fix flaky overlay opacity color issue happening in Chrome browser ([86d875d](86d875d))
* **Radio:** fix radio button disabled issue when inside of group ([#1477](#1477)) ([e775792](e775792))
* **Table:** align HTML/CSS classes and types ([ff0be8d](ff0be8d))
* **Table:** fix sticky Table when no offset is given ([888564d](888564d))
* **Table:** simplify sticky table hook ([f1e7e3b](f1e7e3b))
* **Tag:** properly handle spacing props ([d7129d8](d7129d8))
* **Timeline:** properly handle spacing props ([e823c6e](e823c6e))

### Features

* **Autocomplete:** add support for data suffix_value ([#1467](#1467)) ([fe6fbb7](fe6fbb7))
* **DatePicker:** add size property to component ([#1438](#1438)) ([749a118](749a118))
* **DrawerList:** use CSS Grid for placing list content to enhance flexibility ([#1470](#1470)) ([93fac6b](93fac6b))
* **Icons:** add calendar and bookmark icon ([#1449](#1449)) ([61c9c11](61c9c11))
* **Input:** add inner_element property for internal usage (as of now) ([#1466](#1466)) ([d1b1b19](d1b1b19))
* **MediaQuery:** convert to TypeScript ([1a23e4f](1a23e4f))
* **Modal:** add "bypass_invalidation_selectors" property to omit element invalidation ([d9cb392](d9cb392))
* **NumberFormat:** add srLabel property to enhance more easily a11y for screen reader users ([#1480](#1480)) ([004d675](004d675))
* **Provider:** rewrite to TypeScript ([#1436](#1436)) ([66416d9](66416d9))
* **Table:** change colors of table ([1f3687f](1f3687f))
* **Table:** move to components and rewrite to TypeScript ([562940a](562940a))
* **Timeline:** date supports a list of dates ([#1464](#1464)) ([a5c1dcd](a5c1dcd))
* **Timeline:** rename name to title & date to subtitle with backwards compatibility ([#1468](#1468)) ([6607963](6607963))
@tujoworker
Copy link
Member Author

🎉 This PR is included in version 9.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants