jQWidgets Forums
jQuery UI Widgets › Forums › Editors › DateTimeInput › DateTimeInput focus method not working onload in Firefox
Tagged: datetimeinput, Firefox, focus, jqxdatetimeinput
This topic contains 6 replies, has 3 voices, and was last updated by Mauricio Farinelli 10 years, 7 months ago.
-
Author
-
Using DateTimeInput, I am trying to call focus() method onload.
It works fine for Chrome and IE, but not in Firefox.
Then I have tried with the example you guys provide in JSFiddle: http://jsfiddle.net/jqwidgets/a3R2F/ and it is also not working only for Firefox
If we try this simple $(document).ready() below, it will not work
$(document).ready(function() {
$(“#jqxDateTimeInput”).jqxDateTimeInput(‘focus’);
});
Could you guys help usThanks
Hello Mauricio Farinelli,
We tested the example in question (http://jsfiddle.net/jqwidgets/a3R2F/) and it works fine with the latest versions of Firefox (32.0.1) and jQWidgets (3.5.0).
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/I am testing with :
$(document).ready(function() {
$(“#jqxDateTimeInput”).jqxDateTimeInput(‘focus’);
});
and, on load, it is not working. The click event always workedHello all,
The “focus” method works correctly with FireFox and latest version of jQWidgets. Please, try the following locally in your working machine:
<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../scripts/demos.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdatetimeinput.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcalendar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script> <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script> </head> <body> <div id='content'> <script type="text/javascript"> $(document).ready(function () { // Create a jqxDateTimeInput $("#jqxWidget").jqxDateTimeInput({ width: '250px', height: '25px' }); $("#jqxWidget").jqxDateTimeInput('focus'); }); </script> <div id='jqxWidget'> </div> </div> </body> </html>
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Yes, it works, but the state is kind of different when you do a focus on load, and when you do a focus later with a click on the button.
ON load, you see only the border states changed (in http://jsfiddle.net/jqwidgets/a3R2F/ you see that with a darker blue), but when you click on the button, you see the number inside selected.In Chrome and IE, these behavior is the same for load or click event, only in FF that is kind of different.
Hi Mauricio Farinelli,
Did you at least test the posted code? I mean did you copy the sample to a new web page and test it with jQWidgets 3.5? It focuses the input on load and it works fine. This is an example prepared with jQWidgets 3.5 and is tested with FF.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/hummm…
I see that we are using jQWidgets v3.2.1.
Maybe that problem comes from this old version -
AuthorPosts
You must be logged in to reply to this topic.