Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#6962 closed defect (fixed)

ComboBox's dijitMenuItem node incorrectly reflects the body tag's text-align property

Reported by: ptwobrussell Owned by:
Priority: high Milestone: 1.2
Component: Dijit - Form Version: 1.1.1
Keywords: Cc: ptwobrussell@…
Blocked By: Blocking:

Description

I just noticed that if the body tag has text-align:center set (a common thing you might do, for example, to get IE6 to horizontally center a div), items that appear in a ComboBox? widget contained in that page also center horizontally inside of the popup. (You can correct this and get them to align left again by simply providing a style block in your page that sets the .dijitMenuItem's text-align back to left.)

I bring this up, because it would seem to me that it would always be undesirable to have a dijitMenuItem center horizontally like that because it seems that the body tag's text-align style property should have no bearing on menu items. I don't know, though, if always having it align left is correct either since bidi support might require that it be right aligned for some locales. As such, not sure if the best place to fix this would be in the dijit.form._ComboBoxMenu template string or in the CSS depending on wherever else the dijitMenuItem class is used.

Basically, just logging the issue so some others can weigh in.

Attachments (1)

6962.patch (704 bytes) - added by haysmark 11 years ago.
Fixes #6962. Force menu to align to the right in RTL, or left otherwise.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by bill

Hmm, I'm not sure what to say about this ticket. This probably happens in a number of places like Dialog/TitlePane title bar etc.? And I'm not even sure what the "right" behavior is for the text inside a TitlePane.containerNode.

Changed 11 years ago by haysmark

Attachment: 6962.patch added

Fixes #6962. Force menu to align to the right in RTL, or left otherwise.

comment:2 Changed 11 years ago by bill

Milestone: 1.2

comment:3 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

(In [14294]) Fixes #6962: ComboBox?'s dijitMenuItem node incorrectly reflects the body tag's text-align property. Patch from Mark Hays.

comment:4 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.