fix: compare strings with StringWrapper.equals
Fixes https://github.com/angular/angular/issues/2458
This commit is contained in:
parent
92d565848b
commit
633cf63682
|
@ -91,7 +91,7 @@ export class KeyEventsPlugin extends EventManagerPlugin {
|
||||||
static eventCallback(element, shouldSupportBubble, fullKey, handler, zone) {
|
static eventCallback(element, shouldSupportBubble, fullKey, handler, zone) {
|
||||||
return (event) => {
|
return (event) => {
|
||||||
var correctElement = shouldSupportBubble || event.target === element;
|
var correctElement = shouldSupportBubble || event.target === element;
|
||||||
if (correctElement && KeyEventsPlugin.getEventFullKey(event) === fullKey) {
|
if (correctElement && StringWrapper.equals(KeyEventsPlugin.getEventFullKey(event), fullKey)) {
|
||||||
zone.run(() => handler(event));
|
zone.run(() => handler(event));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue