Opened 11 years ago

Closed 11 years ago

#7589 closed defect (fixed)

MenuItem - this.attr('label') not working

Reported by: dante Owned by: bill
Priority: high Milestone: 1.2
Component: Dijit Version: 1.2beta
Keywords: Cc:
Blocked By: Blocking:

Description

The attribute map for MenuItem seems to be all in order, using containerNode.innerHTML as the label text, but calling this.attr('label') returns nothing and this.label is empty.

example:

dijit.registry.filter(function(w){ 
   return w.declaredClass == "dijit.MenuItem";
   }).forEach(function(w){ 
      console.log(w.label, w.containerNode.innerHTML, w.attr('label')); 
   });

Using this.attr('label', "Some Label"); works.

Change History (2)

comment:1 Changed 11 years ago by bill

Milestone: tbd1.2
Owner: changed from wildbill to bill
Status: newassigned

comment:2 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [15120]) Fixes #7589: MenuItem? - this.attr('label') not working Menu, like Button, has a duality where the menu text can be specified as innerHTML or via the label attribute. The innerHTML case needs to be handled specially. !strict

Note: See TracTickets for help on using tickets.