fix: compare strings with StringWrapper.equals

Fixes https://github.com/angular/angular/issues/2458
This commit is contained in:
Kevin Moore 2015-06-10 19:41:20 +02:00
parent 92d565848b
commit 633cf63682
1 changed files with 1 additions and 1 deletions

View File

@ -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));
} }
}; };