Opened 10 years ago

Last modified 5 years ago

#15409 assigned defect

Cannot return dojox.form.BusyButton to idle with cancel() method

Reported by: nbarr Owned by: Kitson Kelly
Priority: undecided Milestone: 1.15
Component: DojoX Form Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


With the following button:

<button id="busyButtonAccount" dojoType="dojox.form.BusyButton?" busyLabel="{t}Creating...{/t}" type="button" onclick="submitAccount();"> {t}Create{/t} </button>

The following code does not work:

dijit.byId('busyButtonAccount').cancel(); dijit.byId('iban').focus(); dijit.byId('iban').displayMessage(dijit.byId('iban').getErrorMessage());

(iban is a dijit.form.ValidationTextBox?)

The button remains busy

Change History (5)

comment:1 Changed 10 years ago by bill

Component: Dijit - FormDojoX Form
Owner: changed from Douglas Hays to dante

comment:2 Changed 9 years ago by Nick Fenwick

I don't really follow the description here. I ran into something today that may be the same issue. You cannot prevent the busy state being set in the onClick handler of a BusyButton?. When you click a BusyButton?, and try to prevent the 'busy' state taking effect (say because some app logic decides the business cannot go ahead) the button goes busy anyway.


<button data-dojo-type="dojox.form.BusyButton"
  data-dojo-attach-event="onClick: _handle">Click me</button>
_handle: function(evt) {
  if (somethingOrOther) {
    console.log('prevent action');
    this.theButton.cancel(); // has no effect, button goes busy anyway
  .. go ahead with action, button goes busy due to click

This onClick handler is run before the BusyButton?._onClick which sets the busy state of the button.

Is this what you were talking about, nbarr? I'm not sure if I should raise a new ticket for this issue or if it's the same as this ticket.

comment:3 Changed 9 years ago by Kitson Kelly

Owner: changed from dante to Kitson Kelly
Status: newassigned

comment:4 Changed 6 years ago by dylan

Milestone: tbd1.12

comment:5 Changed 5 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.