Closed Bug 159623 Opened 23 years ago Closed 19 years ago

Implement getRowCount() in <menulist> element for consistency

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED DUPLICATE of bug 331625

People

(Reporter: thealx, Unassigned)

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3 BuildID: 20002061503 (Debian 1.0.0-3 package) In any menulist documentation I found (and inspecting by DOM Inspector confirms that) there is no function getRowCount() for menulist element It should exist also in <menulist> - if no other reason, then for consistency with <listbox> Reproducible: Always Steps to Reproduce: 1. create a xul page with listbox and menulist (with some elements) 2. attach somewhere a script : window.alert(listboxelem.getRowCount()); window.alert(menulistelem.getRowCount()); 3. run it Actual Results: listboxelem.getRowCount() return number of rows in listbox, while menulistelem.getRowCount doesn't exist Expected Results: Both function calls should return number of rows. I guess, binding with those four lines (probably with some sanity checks) should do a trick: var popup = this.getElementsByTagName("menupopup")[0]; if (popup) return popup.childNodes.length; return 0;
Reporter can you reproduce this bug with a newer build (1.4 final)? If not, then please close this bug as worksforme. Thanks.
Attached testcase works when calling listbox.getRowCount() and shows an error on JS console while calling menulist.getRowCount() B³±d: menulist.getRowCount is not a function Plik ¼ród³owy: file:///home/thealx/TestCase.xul Wiersz: 30 Tested on Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.4) Gecko/20030714 Debian/1.4-1 A.O., Could You test it on "your" 1.4 ? Maybe it is linux-specific (or Debian-specific) bug ?
Confirming, giving to bryner. /be
Assignee: hyatt → bryner
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: bryner → nobody
QA Contact: shrir → xptoolkit.xul
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: