Skip to content

Commit

Permalink
fix #974 select menu does not close when changing tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Dec 22, 2024
1 parent ac3aacc commit 390c6b2
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ public void run() {
nextSlide();
}
};

init(this);
addAttachListener();
addDetachListener();
init(this);

addEventListener(
EventType.wheel.getName(),
evt -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.dominokit.domino.ui.icons;

import static org.dominokit.domino.ui.utils.Domino.*;
import static org.dominokit.domino.ui.utils.Domino.dui_clickable;

import elemental2.dom.EventListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public ToggleIcon(I primary, I toggle) {
swapCss = AutoSwapCssClass.of(CompositeCssClass.of(primary), CompositeCssClass.of(toggle));
this.primary.addClickListener(
evt -> {
evt.stopPropagation();
if (toggleOnClick) {
toggle();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
import static elemental2.dom.DomGlobal.window;
import static java.util.Objects.nonNull;
import static org.dominokit.domino.ui.events.EventType.mousedown;
import static org.dominokit.domino.ui.utils.Domino.*;
import static org.dominokit.domino.ui.utils.ElementsFactory.elements;

import elemental2.dom.*;
import elemental2.dom.DOMRect;
import elemental2.dom.Element;
import elemental2.dom.Event;
import elemental2.dom.EventListener;
import elemental2.dom.MouseEvent;
import jsinterop.base.Js;
import jsinterop.base.JsPropertyMap;
import org.dominokit.domino.ui.IsElement;
Expand Down
3 changes: 0 additions & 3 deletions domino-ui/src/main/java/org/dominokit/domino/ui/tabs/Tab.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.dominokit.domino.ui.elements.DivElement;
import org.dominokit.domino.ui.elements.LIElement;
import org.dominokit.domino.ui.elements.SpanElement;
import org.dominokit.domino.ui.events.EventType;
import org.dominokit.domino.ui.icons.Icon;
import org.dominokit.domino.ui.utils.*;

Expand Down Expand Up @@ -87,10 +86,8 @@ private Tab() {
.addCss(dui_tab_header_item, dui_tab_header_close)
.addClickListener(
evt -> {
evt.stopPropagation();
close();
})
.addEventListener(EventType.mousedown.getName(), Event::stopPropagation)
.clickable(),
tabHeader);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ public TabsPanel insertAt(int index, Tab tab) {
.addEventListener(
"click",
evt -> {
evt.preventDefault();
evt.stopPropagation();
activateTab(tab);
});
tab.setParent(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
-ms-transform: scale(0) translate(0, 0);
-o-transform: scale(0) translate(0, 0);
transform: scale(0) translate(0, 0);
pointer-events: none;
}
.dui-waves-effect.dui-waves-light .dui-waves-ripple {
background: rgba(255, 255, 255, 0.4);
Expand Down

0 comments on commit 390c6b2

Please sign in to comment.