Skip to content

Commit c737fe1

Browse files
megothArne Hassel
authored andcommitted
Making sure that cancelButton works with vertical tabs as well
1 parent 2f2e164 commit c737fe1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tabs.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,11 @@ UI.tabs.tabWidget = function (options) {
325325
return box
326326

327327
function addCancelButton (tabContainer) {
328-
const extraTab = dom.createElement('td')
328+
const extraTab = dom.createElement(tabElement)
329329
extraTab.classList.add('unstyled')
330-
extraTab.style.textAlign = 'right'
330+
if (tabElement === 'td') {
331+
extraTab.style.textAlign = 'right'
332+
}
331333
const cancelButton = UI.widgets.cancelButton(dom, onClose)
332334
extraTab.appendChild(cancelButton)
333335
tabContainer.appendChild(extraTab)

0 commit comments

Comments
 (0)