diff --git a/pd/nw/pd_canvas.js b/pd/nw/pd_canvas.js index e63f1d69323600b1e2cf08ed40a0765ef2e0162e..c387c4b43b8d82df2a95fc599fd2afec7c19d6aa 100644 --- a/pd/nw/pd_canvas.js +++ b/pd/nw/pd_canvas.js @@ -896,9 +896,10 @@ function nw_create_patch_window_menus(name) { canvas_events.search(); } else { find_bar.style.setProperty('display', 'none'); -// this is wrong and causes bug... we need to set back to whatever state -// we used to be in... probably need a last_state var - canvas_events.none(); + // "normal" seems to be the only viable state for the + // canvas atm. But if there are other states added later, + // we might need to fetch the previous state here. + canvas_events.normal(); } }, key: 'f', diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index c8189dabadf48b6f0a0a931e10d475531bbb762f..7186abd355cd1b247456a05fc39ed414eb4a3f10 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -2936,7 +2936,6 @@ function gui_textarea(cid, tag, type, x, y, max_char_width, text, if (p !== null) { p.parentNode.removeChild(p); } -// this is wrong and causes bug... we need it to go back to previous state if (patchwin[cid].window.canvas_events.get_previous_state() === 'search') { patchwin[cid].window.canvas_events.search();