Commit a2b55262 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

special case for OSX to allow click-dragging the scrollbar

parent 46714d39
......@@ -585,16 +585,26 @@ var canvas_events = (function() {
}
in_dropdown = in_dropdown.parentNode;
}
// Allow scrollbar click and drag without closing the menu
if (in_dropdown &&
evt.pageX - select_elem.offsetLeft >
select_elem.clientWidth) {
return;
}
// Special case for OSX, where the scrollbar doesn't take
// up any extra space
if (nw.process.platform === "darwin"
&& (evt.target.id === "dropdown_list")) {
return;
}
if (evt.target.parentNode
&& evt.target.parentNode.parentNode
&& evt.target.parentNode.parentNode.id === "dropdown_list") {
dropdown_highlight_elem(evt.target);
}
// This selects whatever item is highlighted even
// if we click outside the menu. Might be better to
// cancel in that case.
dropdown_index_to_pd(select_elem);
select_elem.style.setProperty("display", "none");
canvas_events.normal();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment