1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

Fix broken onClick on checkboxes etc.

onClick on checkbox would get triggered before actually ticking the
checkbox, which is not the expected behaviour (apparently). This change
makes sure that we call the onClick event handler only after actually
doing our work with the checkbox/select widget (for the other widgets,
things should stay the same).
This commit is contained in:
Petr Baudis 2005-12-10 03:48:42 +01:00 committed by Petr Baudis
parent 588ba7db30
commit 0281f732ab

View File

@ -900,12 +900,12 @@ enter(struct session *ses, struct document_view *doc_view, int do_reload)
link = get_current_link(doc_view);
if (!link) return FRAME_EVENT_REFRESH;
if (!current_link_evhook(doc_view, SEVHOOK_ONCLICK))
return FRAME_EVENT_REFRESH;
if (!link_is_form(link)
|| link_is_textinput(link)
|| link->type == LINK_BUTTON) {
if (!current_link_evhook(doc_view, SEVHOOK_ONCLICK))
return FRAME_EVENT_REFRESH;
if (goto_current_link(ses, doc_view, do_reload))
return FRAME_EVENT_OK;
@ -959,6 +959,9 @@ enter(struct session *ses, struct document_view *doc_view, int do_reload)
INTERNAL("bad link type %d", link->type);
}
if (!current_link_evhook(doc_view, SEVHOOK_ONCLICK))
return FRAME_EVENT_REFRESH;
return FRAME_EVENT_REFRESH;
}