diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-02-07 00:50:37 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-02-07 00:50:37 +0000 |
commit | 2c2ac87e37c2098421b83f9e684e29c7e01b24f4 (patch) | |
tree | 76acd14375d2f5b329440932bb4594550fd10a0d /desktop/textinput.c | |
parent | 5c1f3bd8c899ec79a504d74023143bb4594cfd6c (diff) | |
download | netsurf-2c2ac87e37c2098421b83f9e684e29c7e01b24f4.tar.gz netsurf-2c2ac87e37c2098421b83f9e684e29c7e01b24f4.tar.bz2 |
Prevent tabbing into textfields whose styling is display: none;
svn path=/trunk/netsurf/; revision=3849
Diffstat (limited to 'desktop/textinput.c')
-rw-r--r-- | desktop/textinput.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/desktop/textinput.c b/desktop/textinput.c index 4c54924c9..34006dbaf 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -925,11 +925,14 @@ bool browser_window_input_callback(struct browser_window *bw, case 9: { /* Tab */ struct form_control *next_input; + /* Find next text entry field that is actually + * displayed (i.e. has an associated box) */ for (next_input = input->gadget->next; next_input && - next_input->type != GADGET_TEXTBOX && + ((next_input->type != GADGET_TEXTBOX && next_input->type != GADGET_TEXTAREA && - next_input->type != GADGET_PASSWORD; + next_input->type != GADGET_PASSWORD) || + !next_input->box); next_input = next_input->next) ; if (!next_input) @@ -950,11 +953,14 @@ bool browser_window_input_callback(struct browser_window *bw, case 11: { /* Shift + Tab */ struct form_control *prev_input; + /* Find previous text entry field that is actually + * displayed (i.e. has an associated box) */ for (prev_input = input->gadget->prev; prev_input && - prev_input->type != GADGET_TEXTBOX && + ((prev_input->type != GADGET_TEXTBOX && prev_input->type != GADGET_TEXTAREA && - prev_input->type != GADGET_PASSWORD; + prev_input->type != GADGET_PASSWORD) || + !prev_input->box); prev_input = prev_input->prev) ; if (!prev_input) |