Skip to content

Commit

Permalink
fix match2 bracket popups in safari on iOS17 (#3326)
Browse files Browse the repository at this point in the history
This works by avoiding floats in flex items, and instead using an inline flex container
  • Loading branch information
FO-nTTaX authored Sep 27, 2023
1 parent a854354 commit b86d0df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/match2/wikis/dota2/match_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ function CustomMatchSummary._opponentHeroesDisplay(opponentHeroesData, numberOfH
:addClass('brkts-popup-side-color-' .. color)
:addClass('brkts-popup-side-hero')
:addClass('brkts-popup-side-hero-hover')
:css('float', flip and 'right' or 'left')
:node(HeroIcon._getImage{
hero = opponentHeroesData[index],
size = _SIZE_HERO,
Expand All @@ -339,6 +338,7 @@ function CustomMatchSummary._opponentHeroesDisplay(opponentHeroesData, numberOfH

local display = mw.html.create('div')
:addClass('brkts-popup-body-element-thumbs')
:addClass('brkts-popup-body-element-thumbs-' .. (flip and 'right' or 'left'))
for _, item in ipairs(opponentHeroesDisplay) do
display:node(item)
end
Expand Down
2 changes: 1 addition & 1 deletion components/match2/wikis/leagueoflegends/match_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ function CustomMatchSummary._opponentHeroesDisplay(opponentHeroesData, numberOfH
for index = 1, numberOfHeroes do
local heroDisplay = mw.html.create('div')
:addClass('brkts-popup-side-color-' .. color)
:css('float', flip and 'right' or 'left')
:node(HeroIcon._getImage{opponentHeroesData[index], date = date})
if numberOfHeroes == _NUM_HEROES_PICK_SOLO then
if flip then
Expand All @@ -310,6 +309,7 @@ function CustomMatchSummary._opponentHeroesDisplay(opponentHeroesData, numberOfH

local display = mw.html.create('div')
:addClass('brkts-popup-body-element-thumbs')
:addClass('brkts-popup-body-element-thumbs-' .. (flip and 'right' or 'left'))
:addClass('brkts-champion-icon')

for _, item in ipairs(opponentHeroesDisplay) do
Expand Down
2 changes: 1 addition & 1 deletion components/match2/wikis/splatoon/match_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ function CustomMatchSummary._opponentWeaponsDisplay(props)
local displayElements = Array.map(props.data, function(weapon)
return mw.html.create('div')
:addClass('brkts-champion-icon')
:css('float', flip and 'right' or 'left')
:node(WeaponIcon._getImage{
weapon = weapon,
game = props.game,
Expand All @@ -384,6 +383,7 @@ function CustomMatchSummary._opponentWeaponsDisplay(props)

local display = mw.html.create('div')
:addClass('brkts-popup-body-element-thumbs')
:addClass('brkts-popup-body-element-thumbs-' .. (flip and 'right' or 'left'))

for _, item in ipairs(displayElements) do
display:node(item)
Expand Down

0 comments on commit b86d0df

Please sign in to comment.