Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed iso dropdown menu in Run Once window #962

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9457,7 +9457,7 @@ fieldset[disabled] .btn-primary.active {
top: auto;
}
.open .dropdown-submenu.active > .dropdown-menu {
display: block;
display: grid;
}
.dropdown-kebab-pf.btn-group > .btn:first-child,
.dropdown-kebab-pf .btn-link {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ interface Style extends CssResource {
String label();
String selectedValue();
String button();
String buttonSelected();
}

interface ListItemTemplate extends SafeHtmlTemplates {
Expand Down Expand Up @@ -169,6 +170,7 @@ private Button createButton() {
button.getElement().setAttribute(DATA_TOGGLE, Styles.DROPDOWN);
selectedValue = Document.get().createSpanElement();
selectedValue.addClassName(FILTER_OPTION);
selectedValue.addClassName(style.buttonSelected());
selectedValue.addClassName(Styles.PULL_LEFT); //$NON-NLS-1$
selectedValue.setInnerHTML(NBSP);
return button;
Expand Down Expand Up @@ -387,7 +389,7 @@ public void scrollToSelected() {
if (child instanceof ListModelListBox.ListItem) {
final ListItem item = (ListModelListBox<T>.ListItem) child;
if (item.isSelected()) {
Scheduler.get().scheduleDeferred(() -> item.getElement().scrollIntoView());
Scheduler.get().scheduleDeferred(() -> scrollIntoView(item.getElement()));
}
}
}
Expand Down Expand Up @@ -447,6 +449,10 @@ public void clear() {
getClickHandlers().clear();
getElement().removeAllChildren();
}

private native void scrollIntoView(Element element) /*-{
element.scrollIntoView({block: "nearest", inline: "nearest"});
}-*/;
}

protected class ListItem extends ComplexPanel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@
padding-right: 25px;
}

.buttonSelected {
overflow: hidden;
text-overflow: ellipsis;
}

.fullWidth {
width: 100%!important;
}

.scrollableMenu {
height: auto;
max-height: 130px;
overflow-x: hidden;
width: auto;
overflow-x: auto;
width: 100%;
min-width: 100%;
}

.selected {
background-color: #0099d3!important;
border-color: #0076b7!important;
color: #fff!important;
padding-right: 40px!important;
}

.selectedValue {
Expand All @@ -41,6 +45,7 @@

.liPosition {
position: relative;
width: 100%;
}

.inlineBlock {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
}

.panelStyle {
table-layout: fixed;
background: #e5ecff;
border-top: 2px solid white;
width: 100%;
Expand Down
Loading