Skip to content

Commit 010550b

Browse files
committed
Country selection dropdown should not have horizontal scroll
Country selection dropdown should not have horizontal scroll
1 parent 4ce110a commit 010550b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

components/Dropdown/Dropdown.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class Dropdown extends React.Component {
123123
)
124124
return (
125125
<div className={ddClasses} onClick={noAutoclose ? () => { } : handleClick}>
126-
{handleKeyboardNavigation && (<a onKeyDown={onKeydown} className="handle-keyboard" href="javascript:;"></a>)}
126+
{handleKeyboardNavigation && (<a tabIndex="0" onKeyDown={onKeydown} className="handle-keyboard" href="javascript:;"></a>)}
127127
{
128128
childrenWithProps.map((child, index) => {
129129
if (child.props.className.indexOf('dropdown-menu-header') > -1)

components/Dropdown/Dropdown.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
font-size: 12px;
3838
display: block;
3939
line-height: 26px;
40+
overflow: hidden;
41+
white-space: pre-line;
4042
}
4143
}
4244
}
@@ -86,6 +88,10 @@
8688
top: 0;
8789
left: 0;
8890
height: 100%;
91+
92+
&:focus {
93+
outline: 5px auto -webkit-focus-ring-color;
94+
}
8995
}
9096
}
9197

components/Formsy/PhoneInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class PhoneInput extends Component {
105105
{
106106
this.props.listCountry.map((country, i) => {
107107
/* eslint-disable react/jsx-no-bind */
108-
return <li className={(this.state.currentCountry.code === country.code) ? 'selected' : ''} onClick={() => this.choseCountry(country)} key={i}><a href="javascript:;">{country.name}</a></li>
108+
return <li tabIndex="-1" className={(this.state.currentCountry.code === country.code) ? 'selected' : ''} onClick={() => this.choseCountry(country)} key={i}><a href="javascript:;">{country.name}</a></li>
109109
})
110110
}
111111
</ul>

0 commit comments

Comments
 (0)