Reputation: 2432
I have a aspx page. By default, when the page loads the focus is on first textbox. I want to remove the focus to nothing. I am developing this website for a mobile device.
We have come to this nothing conclusion due to some cross browser restrictions we faced with IE.
Page.Focus();
in the init is not working and I don't want to set up the focus to anything.
This information is all I have. Hope it is sufficient for possible resolution.
I will appreciate your feedback and time spend on this query...
Upvotes: 2
Views: 3601
Reputation: 28097
If you're able to use jQuery why don't you do
$('#idOfInputWhichKeepsOnGettingFocus').blur();
If not, create a new first field
<input id="youCannotSeeMe" style="position:absolute; left:9001px;" />
Upvotes: 1
Reputation: 32661
An alternative can be to create a hidden control and move the focus to that control
Upvotes: 2