Commit 375d2faa authored by Gabriela Bittencourt's avatar Gabriela Bittencourt
Browse files

Add the mouse facility to the autocomplete feature

parent 44a9c0fc
Pipeline #3724 failed with stage
in 0 seconds
......@@ -484,11 +484,19 @@ var canvas_events = (function() {
evt.preventDefault();
},
text_mousemove: function(evt) {
if (evt.target.parentNode === document.getElementById("autocomplete_dropdown")) {
let sel = document.getElementById("autocomplete_dropdown").getAttribute("selected_item");
let new_sel = evt.target.getAttribute("idx");
pdgui.update_autocomplete_selected(document.getElementById("autocomplete_dropdown"), sel, new_sel)
}
evt.stopPropagation();
//evt.preventDefault();
return false;
},
text_mousedown: function(evt) {
if (evt.target.parentNode === document.getElementById("autocomplete_dropdown")) {
pdgui.select_result_autocomplete_dd(textbox(), document.getElementById("autocomplete_dropdown"));
}
if (textbox() !== evt.target && !target_is_scrollbar(evt)) {
utils.create_obj();
// send a mousedown and mouseup event to Pd to instantiate
......
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