diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-04 17:08:04 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-04 17:08:04 -0800 |
commit | a4c82ffe8a6d923b9b5218915db071be85acd1dd (patch) | |
tree | eae95e8add42484ce527ffdab508a3ad20580f50 /src | |
parent | c2ebb6b5dec4dee50a1beb778c0952118e756e6d (diff) | |
download | DotNetOpenAuth-a4c82ffe8a6d923b9b5218915db071be85acd1dd.zip DotNetOpenAuth-a4c82ffe8a6d923b9b5218915db071be85acd1dd.tar.gz DotNetOpenAuth-a4c82ffe8a6d923b9b5218915db071be85acd1dd.tar.bz2 |
Fixed OpenIdSelector when it's placed in an INamingContainer so that it can still find its ajax text box.
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js index 2041618..49c856e 100644 --- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js +++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js @@ -9,7 +9,7 @@ $(function() { var hint = $.cookie('openid_identifier') || ''; - var ajaxbox = $('#openid_identifier')[0]; + var ajaxbox = document.getElementsByName('openid_identifier')[0]; if (hint != 'infocard') { ajaxbox.setValue(hint); } @@ -35,7 +35,7 @@ $(function() { .removeClass('grayedOut') .addClass('focused'); $('#OpenIDForm').show('slow', function() { - $('#openid_identifier').focus(); + ajaxbox.focus(); }); } } @@ -158,12 +158,13 @@ $(function() { } }); $('#OpenIDButton').click(function() { + // Be careful to only try to select the text box once it is available. if ($('#OpenIDForm').is(':hidden')) { $('#OpenIDForm').show('slow', function() { - $('#openid_identifier').focus(); + ajaxbox.focus(); }); } else { - $('#openid_identifier').focus(); + ajaxbox.focus(); } }); |