Question

I am new to using dijit and dojo. I am currently using dijit 1.6.0 and have a ComboBox defined as so:

this.comboBox = new dijit.form.ComboBox({
    style : "margin-left: 10px; text-align: left",
    store : this.comboBoxData,
    searchAttr : "label",
    selectOnClick : true,
    value : "All",
    onChange : dojo.hitch(this, this.onObjectiveChanged)
});

When the value within the combo box is changed and if the text is too large for the width of the combo box, the text appears right aligned instead of left aligned. I have read that this might be a bug in IE8 where the focus of the cursor is at the last character of the text, in which case this might not be a css issue. I am not entirely sure how to get the cursor within the combobox to focus on the first character of text.

Was it helpful?

Solution

I managed to get the combo box to display the beginning of the text rather than the end by calling this.comboBox.focus() whenever a value is either changed or selected within the comboBox

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top