fix action sheet in firefox

This commit is contained in:
Luke Pulverenti 2016-08-09 14:22:19 -04:00
parent bdc77cd46d
commit 7cf86e9e30
2 changed files with 7 additions and 3 deletions

View File

@ -37,6 +37,10 @@
flex-shrink: 0;
}
.actionSheetMenuItem-noflex {
display: block;
}
.actionSheetItemText {
padding: .8em 0;
white-space: nowrap;

View File

@ -170,14 +170,14 @@
html += '<div class="actionSheetScroller ' + scrollType + '" style="' + style + '">';
var itemTagName = 'button';
var menuItemClass = browser.noFlex || browser.firefox ? 'actionSheetMenuItem actionSheetMenuItem-noflex' : 'actionSheetMenuItem';
for (i = 0, length = options.items.length; i < length; i++) {
option = options.items[i];
var autoFocus = option.selected ? ' autoFocus' : '';
html += '<' + itemTagName + autoFocus + ' is="emby-button" type="button" class="actionSheetMenuItem" data-id="' + (option.id || option.value) + '">';
html += '<button' + autoFocus + ' is="emby-button" type="button" class="' + menuItemClass + '" data-id="' + (option.id || option.value) + '">';
if (option.icon) {
html += '<i class="actionSheetItemIcon md-icon">' + option.icon + '</i>';
@ -186,7 +186,7 @@
html += '<i class="actionSheetItemIcon md-icon" style="visibility:hidden;">check</i>';
}
html += '<div class="actionSheetItemText">' + (option.name || option.textContent || option.innerText) + '</div>';
html += '</' + itemTagName + '>';
html += '</button>';
}
if (options.showCancel) {