-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.0.0, 2.0.0.36-deprecated
-
Fix Version/s: 2.0.x, master, master-deprecated, 3.0.x, 2.0.0.71-deprecated, 3.1.x
-
Component/s: DatePicker
-
Labels:None
-
Git Pull Request:
If datePicker.getPopover() is called, and the datePicker's trigger has not been clicked, an error is thrown.
Steps to reproduce:
1. Run the following JavaScript and HTML (jsfiddle provided):
<html> <head> <script src="http://cdn.alloyui.com/3.0.0/aui/aui-min.js"></script> <link href="http://cdn.alloyui.com/3.0.0/aui-css/css/bootstrap.min.css" rel="stylesheet"></link> </head> <body> <input id="input" /> <script>
YUI().use('aui-datepicker', function (Y) { var datePicker = new Y.DatePicker({ trigger: '#input' }); datePicker.getPopover(); });
</script> </body> </html>
2. Click anywhere EXCEPT on the input/trigger.
If the bug still exists, you will see the following error in the browser logs:
Uncaught TypeError: Cannot read property 'contains' of undefined
- relates
-
LPS-61883 DatePicker throws "Uncaught TypeError" when getPopover() is called and anything other than trigger is clicked
- Closed