Skip to content

Datepicker: Check if typeof input === 'object' Fixed #6669 - Datepicker: _selectDate restores focus to non-object#337

Closed
marcneuwirth wants to merge 2 commits intojquery:masterfrom
marcneuwirth:bug_6669
Closed

Datepicker: Check if typeof input === 'object' Fixed #6669 - Datepicker: _selectDate restores focus to non-object#337
marcneuwirth wants to merge 2 commits intojquery:masterfrom
marcneuwirth:bug_6669

Conversation

@marcneuwirth
Copy link
Contributor

Datepicker: Check if typeof input === 'object' Fixed #6669 - Datepicker: _selectDate restores focus to non-object

…er: _selectDate restores focus to non-object
@gnarf
Copy link
Member

gnarf commented Jun 10, 2011

I noticed there isn't already a test case for the issue on the trac - do you have one? @scottgonzalez was wondering if we even need this if statement at all. Thoughts?

@marcneuwirth
Copy link
Contributor Author

I don't have a test case, just saw it in trac and fixed it while I was in datepicker for #7124 and #6669

@gnarf
Copy link
Member

gnarf commented Jun 14, 2011

@marcneuwirth can you ammend this commit and just remove the if altogether... if the input is empty, .focus() won't do anything anyway since it .each's the collection

@marcneuwirth
Copy link
Contributor Author

Hmm if i remove the if it will be:

this._lastInput = inst.input[0];
this._lastInput = null;

I'm guessing that second statement should be removed as well?

@gnarf
Copy link
Member

gnarf commented Jun 14, 2011

No, the .focus() should stay inbetween those two lines... Is _lastInput used in the focus event by chance?

@gnarf
Copy link
Member

gnarf commented Jun 16, 2011

The only thing missing right now is the test case... Got one yet? @scottgonzalez Do we know enough about this to just pull it?

@scottgonzalez
Copy link
Member

I think we're fine to just land it after manual testing.

@gnarf
Copy link
Member

gnarf commented Jun 22, 2011

Thanks, landed in 5f0a2f0

@gnarf gnarf closed this Jun 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants