ohio813 / openid-selector

Automatically exported from code.google.com/p/openid-selector
0 stars 0 forks source link

Duplicate openid_identifier Element #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
NOTE: This problem is visible when the login action occurs in a popup window, 
thus leaving the main login page open.

1. Select a provider that requires a user name (ie: AOL)
2. When prompted to login, cancel
3. Focus back to the main openid login screen
4. Select openID as the provider
5. At this point when inspecting in firebug there is now a hidden input with an 
id="openid_identifier" (Created when clicking submit when trying to login with 
AOL), AND secondary visable input with id="openid_identifier" (created on the 
form normally when openID provider is selected)

What is the expected output? What do you see instead?
The expected output is for there to be only one HTML element with 
id="openid_identifier". 
I see two instead.

What version of the product are you using? On what operating system?
1.3 / Windows

Please provide any additional information below.
The following diff will fix the issue (probably not the most elegant fix, but 
works)

useInputBox : function(provider) {
        var input_area = $('#openid_input_area');
        var html = '';
[...]
                 input_area.empty();
        + var duplicateHiddenObj = document.getElementById('openid_identifier');
        + if(duplicateHiddenObj != null){duplicateHiddenObj.parentNode.removeChild(duplicateHiddenObj);}

                input_area.append(html);
               $('#' + id).focus();
    },

[...]

Original issue reported on code.google.com by ladybug3...@gmail.com on 8 Dec 2011 at 7:26