on master help sign in
Stopped event propagation in hoverables.
3587127Eric Easley
runtime/Render/Element.js+3−1
@@ -64,14 +64,16 @@ function addHover(e, handler) {
64 e.elm_hover_handler = handler;
64 e.elm_hover_handler = handler;
65 e.elm_hover_count = 0;
65 e.elm_hover_count = 0;
66
66
67− function over() {
67+ function over(evt) {
68 if (e.elm_hover_count++ > 0) return;
68 if (e.elm_hover_count++ > 0) return;
69 e.elm_hover_handler(true);
69 e.elm_hover_handler(true);
70+ evt.stopPropagation();
70 }
71 }
71 function out(evt) {
72 function out(evt) {
72 if (e.contains(evt.toElement || evt.relatedTarget)) return;
73 if (e.contains(evt.toElement || evt.relatedTarget)) return;
73 e.elm_hover_count = 0;
74 e.elm_hover_count = 0;
74 e.elm_hover_handler(false);
75 e.elm_hover_handler(false);
76+ evt.stopPropagation();
75 }
77 }
76 e.elm_hover_over = over;
78 e.elm_hover_over = over;
77 e.elm_hover_out = out;
79 e.elm_hover_out = out;