Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#166 closed defect (fixed)

[patch] HtmlComboBox - comboBoxValue not being populated.

Reported by: [email protected] Owned by: alex
Priority: high Milestone:
Component: Widgets Version: 0.1
Keywords: Widget Combo Cc:
Blocked By: Blocking:


When the selectOption method is called in the HtmlComboBox? the following code is executed.

this.comboBoxValue = tgt.getAttribute("resultName");
this.comboBoxSelectionValue = tgt.getAttribute("resultValue");

However comboBoxValue and comboBoxSelectionValue are inputs. I think the code should read:

this.comboBoxValue.value = tgt.getAttribute("resultName");
this.comboBoxSelectionValue.value = tgt.getAttribute("resultValue");

Attachments (1)

HtmlComboBox.diff (1.9 KB) - added by [email protected] 17 years ago.
HtmlComboBox?.js Patch

Download all attachments as: .zip

Change History (7)

Changed 17 years ago by [email protected]

Attachment: HtmlComboBox.diff added

HtmlComboBox?.js Patch

comment:1 Changed 17 years ago by [email protected]

In additional to the original bug I have found a couple of others:

  • Pressing space bar on the result list behaves differently to clicking a result with the mouse. These two actions will now both perform the same action.
  • Pressing enter on a result should behave the same as pressing space. To keep its action in line with html select boxes the enter event for form submission should be cancelled. Note: I haven't got the event cancel to work yet.

comment:2 Changed 17 years ago by [email protected]

Summary: HtmlComboBox - comboBoxValue not being populated.[patch] HtmlComboBox - comboBoxValue not being populated.

comment:3 Changed 17 years ago by alex

Milestone: 0.2release

comment:4 Changed 17 years ago by alex

Owner: changed from anonymous to alex
Status: newassigned

I'm not sure it's possible to handle the form submission issue cleanly. Users will need to be advised to do a <form onsubmit=return false;" if they really want to clobber it and manage this manually.

comment:5 Changed 17 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [2051]) merging an updated variant of Richard Paul's patch.

fixes #166

comment:6 Changed 15 years ago by (none)

Milestone: 0.2release

Milestone 0.2release deleted

Note: See TracTickets for help on using tickets.