This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
md-text-float raises error on click #553
Closed
Description
I use md-bottom-sheet
as a wrapper for the sign in form and md-text-float
as inputs:
On some devises (e.g. my tablet & chrome emulation of nexus 7) I see that error when I try to click on the field inside the md-bottom-sheet
element:
Uncaught TypeError: Cannot read property '0' of undefined angular-material-871f3ed9aaf14330ee72bf77479bbd2b.js?body=1:1160
getY angular-material-871f3ed9aaf14330ee72bf77479bbd2b.js?body=1:1160
onTouchStart angular-material-871f3ed9aaf14330ee72bf77479bbd2b.js?body=1:1117
jQuery.event.dispatch jquery-967caacfe1cc2c76f46786a9e8393bf0.js?body=1:4642
elemData.handle jquery-967caacfe1cc2c76f46786a9e8393bf0.js?body=1:4310
Here is the angular-material-871f3ed9aaf14330ee72bf77479bbd2b.js?body=1:1160
:
/**
* Helper function to find the Y aspect of various touch events.
**/
function getY(e) {
var touch = e.touches && e.touches.length ? e.touches[0] : e.changedTouches[0];
return touch.clientY;
}
I have inspected code a bit and see that both e.touches
and e.changedTouches
are null
. Thus the last expression e.changedTouches[0]
raises the error Cannot read property '0' of undefined
.
I am not totally sure why does this happen but if I use the same md-text-float
elements outside the md-bottom-sheet
they work just well. Am I doing something wrong or is it a bug?