-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
656 autofill bug #1609
656 autofill bug #1609
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
[isRequired]="true" | ||
[spellcheck]="false" | ||
[autocapitalize]="false" | ||
autocomplete="email" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what difference does it make with or without this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The In my quick tests it seems that both Chrome and FF can infer this if the input has a name or type that defines |
||
tabindex="-1" | ||
tabIndex="1" | ||
></ts-input> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { createMouseEvent } from '@terminus/ngx-tools/testing'; | ||
|
||
import { isMouseEvent } from './is-mouse-event'; | ||
|
||
|
||
describe(`isMouseEvent`, function() { | ||
|
||
test(`should return true for mouse events`, function() { | ||
const fakeMouseEvent = createMouseEvent('click'); | ||
expect(isMouseEvent(fakeMouseEvent)).toEqual(true); | ||
}); | ||
|
||
|
||
test(`should return false for anything that is not a mouse event`, function() { | ||
const badValues = [ | ||
null, | ||
void 0, | ||
1, | ||
0, | ||
'foo', | ||
{}, | ||
'', | ||
]; | ||
|
||
for (const value of badValues) { | ||
expect(isMouseEvent(value as any)).toEqual(false); | ||
} | ||
}); | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the meat of this fix...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Mainly we were passing a reference to our component rather than the actual
<input>
element. Moving the setup intongAfterViewInit
just makes sure all thengIf
s are settled before using that reference.