Threaded View
-
11 May 2012 10:25 AM #1
Checkbox Focus/Blur Issue on Chrome
Checkbox Focus/Blur Issue on Chrome
Hello,
I have an issue with using the checkbox focus/blur events on Chrome.
On Chrome, when the user clicks on the checkbox, it doesn't trigger the focus and blur listener events, but it works as expected on Firefox and IE9. It seems the focus/blur events only get triggered if the user uses "Tab" button. Is it a bug or this is by design?
This is the code I used to test:
Code:<html> <head> <link href="/resources/css/ext-all.css" media="screen" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/javascript/ext4/ext-all-debug.js"></script> <script type="text/javascript" src="/javascript/jquery/jquery-debug.js"></script> <script type="text/javascript"> Ext.onReady(function() { var checkbox = Ext.create("Ext.form.field.Checkbox", { id: "checkbox_ID", renderTo: "checkbox_DIV", boxLabel: "Checkbox Test", listeners: { focus: function(checkbox) { alert("focus"); }, blur: function(checkbox) { alert("blur"); }, afterrender: function(checkbox) { checkbox.inputEl.on("click", function() { $("#spanText").html("Checkbox is clicked!"); }); } } }); }); </script> </head> <body> <div id="checkbox_DIV"></div> <span id="spanText"></span> </body> </html>
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote