Opened 5 years ago

Last modified 4 years ago

#13513 new defect

Page jump in Firewall -> Traffic Rules

Reported by: tplink Owned by:
Priority: high Milestone: Attitude Adjustment 12.09.1
Component: luci Version: Attitude Adjustment 12.09
Keywords: traffic rules page jump Cc:


When viewing the Luci page of Firewall -> Traffic Rules (path /cgi-bin/luci/;stok=<sessionid>/admin/network/firewall/rules/), browsers will automatically jump to the middle page at the section titled "Open ports on router".

This is reproducible on IE, Chrome (PC and Mac) and Safari. There is some HTML or JS code in that page that seems to cause browsers to jump to the section.

I've not found what causes it, but will add more information and patch if I do so before this get fixed.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by anonymous

it also happen in 'DHCP and DNS'

comment:2 Changed 5 years ago by metai

This is caused by a rather strange behaviour in the cbi_combobox function in LuCI's cbi.js that is responsible for both creating and managing "combo boxes", i.e., the select fields that can switch to being an input field.

The culprit is in cbi.js, lines 509 and 510:


This is clearly a workaround to trigger a validation mechanism every time a combo box is created, which happens every time the combo box moves from input field to select field. But also on its first initialization, and that's the cause of this ticket: It calls focus and blur on the select box, causing the browser to move it into view. (It doesn't move it "into the middle", or to a certain point of the page, it moves the bottom select boxes into view, the top of the visible area depends on your browser height.)

I am still trying wrapping my head around the mechanism, I will try to submit a patch if and when I completely understand the quite strange interconnections between this combo box mechanism and the validation routines.

comment:3 Changed 4 years ago by anonymous

Error reproduced on Attitude Adjustment 12.09.

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.