Commit 04001e44 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

set the right canvas state when hiding the search bar

parent bfc68334
......@@ -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',
......
......@@ -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();
......
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