Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1500 closed defect (fixed)

dojo.widget.Button's click does not receive the focus in IE

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

In the following sample code, a focus does not move when I click dojo:Button in IE though it moves in Firefox. As a result, onblur/onchange event do not fire in input text element.

<html>
<head>
<script type="text/javascript">
var djConfig = {isDebug: true};
</script>
<script type="text/javascript" src="dojo/dojo.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.*");
dojo.addOnLoad(function() {
	var input1 = dojo.byId("input1");
	input1.focus();
	dojo.event.connect(input1, "onchange", function() {dojo.debug("onchange");});
	dojo.event.connect(input1, "onblur", function() {dojo.debug("onblur");});
});
</script>
</head>
<body>
<input id="input1" type="text">
<dojo:Button id="button1" caption="Test"></dojo:Button>
</body>
</html>

Attachments (1)

1500.patch (1.6 KB) - added by Douglas Hays 13 years ago.
added focus call to buttonClick methods in Button.js

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 years ago by guest

Additional info: My resolution is to add the following line in Button.js.

onMouseDown: function(e){
    this.domNode.focus(); // <<-- added

comment:2 Changed 13 years ago by bill

Owner: changed from bill to Douglas Hays

comment:3 Changed 13 years ago by dylan

Milestone: 0.4

Changed 13 years ago by Douglas Hays

Attachment: 1500.patch added

added focus call to buttonClick methods in Button.js

comment:4 Changed 13 years ago by Douglas Hays

Status: newassigned

comment:5 Changed 13 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [5947]) Fixes #1500

comment:6 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.