mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
1018: Avoid assertion failure in SELECT pop-up for non-current tab
Check in refresh_view() whether the tab is still current; if not, skip the draw_doc() and draw_frames() calls because draw_current_link() called within them asserts that the tab is current. However, do always call print_screen_status(), because that handles non-current tabs correctly too. I think it was not yet possible to trigger the assertion failure with setTimeout, because input.value modifications by ECMAScript do not trigger a redraw (bug 1035).
This commit is contained in:
parent
7116daf43e
commit
6b9be71150
4
NEWS
4
NEWS
@ -30,6 +30,10 @@ Bugs that should be removed from NEWS before the 0.12.0 release:
|
||||
|
||||
* critical: Fix crash after a tab was opened during reload. This was
|
||||
triggered by the bug 620 fix in ELinks 0.12pre1.
|
||||
* critical bug 1018: Avoid an assertion failure when selecting a value
|
||||
from a pop-up menu for an input field in a tab that is no longer
|
||||
current, e.g. because another tab was opened with elinks -remote.
|
||||
This bug was first released in ELinks 0.12pre1.
|
||||
* major bug 1026 in user SMJS: Protect the callback of elinks.load_uri
|
||||
from the garbage collector. The elinks.load_uri method was added in
|
||||
ELinks 0.12pre1.
|
||||
|
@ -377,7 +377,13 @@ draw_formatted(struct session *ses, int rerender)
|
||||
void
|
||||
refresh_view(struct session *ses, struct document_view *doc_view, int frames)
|
||||
{
|
||||
draw_doc(ses, doc_view, 1);
|
||||
if (frames) draw_frames(ses);
|
||||
/* If refresh_view() is being called because the value of a
|
||||
* form field has changed, @ses might not be in the current
|
||||
* tab: consider SELECT pop-ups behind which -remote loads
|
||||
* another tab, or setTimeout in ECMAScript. */
|
||||
if (ses->tab == get_current_tab(ses->tab->term)) {
|
||||
draw_doc(ses, doc_view, 1);
|
||||
if (frames) draw_frames(ses);
|
||||
}
|
||||
print_screen_status(ses);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user