diff --git a/src/javascript/app/pages/trade/markets/markets-dropdown.jsx b/src/javascript/app/pages/trade/markets/markets-dropdown.jsx index b54f91b3496..fb29d3210c0 100644 --- a/src/javascript/app/pages/trade/markets/markets-dropdown.jsx +++ b/src/javascript/app/pages/trade/markets/markets-dropdown.jsx @@ -146,7 +146,7 @@ export const MarketsDropdown = () => { let closestOffset = Infinity; marketDivs.forEach((div) => { - const paddingOffset = 120; + const paddingOffset = window.innerWidth > 768 ? 120 : 220; const offsetTop = div.offsetTop - container.scrollTop - paddingOffset; if (offsetTop <= 0 && Math.abs(offsetTop) < Math.abs(closestOffset)) { @@ -291,22 +291,22 @@ export const MarketsDropdown = () => { return ( - + {Object.keys(symbols).map((symbol_key) => { const symbol = symbols[symbol_key]; const { display } = symbol; const isSelected = symbol_key === selectedMarket; return ( -
- handleUnderlyingClick(symbol_key)} - label={display} - selected={isSelected} - className={isSelected && 'market-item-selected'} - size='md' - /> -
+ handleUnderlyingClick(symbol_key)} + label={display} + selected={isSelected} + className={isSelected && 'market-item-selected'} + size='md' + /> ); })}