Skip to content

Commit 6deb049

Browse files
Work around Opera issue in createResponder; simplify access to elements in Event.cache.
1 parent 08112b7 commit 6deb049

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/prototype/dom/event.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,17 +1331,17 @@
13311331
return createMouseEnterLeaveResponder(uid, eventName, handler);
13321332

13331333
return function(event) {
1334-
var cacheEntry = Event.cache[uid];
1335-
var element = cacheEntry.element;
1336-
1334+
if (!Event.cache) return;
1335+
1336+
var element = Event.cache[uid].element;
13371337
Event.extend(event, element);
13381338
handler.call(element, event);
13391339
};
13401340
}
13411341

13421342
function createResponderForCustomEvent(uid, eventName, handler) {
13431343
return function(event) {
1344-
var cacheEntry = Event.cache[uid], element = cacheEntry.element;
1344+
var element = Event.cache[uid].element;
13451345

13461346
if (Object.isUndefined(event.eventName))
13471347
return false;
@@ -1356,8 +1356,8 @@
13561356

13571357
function createMouseEnterLeaveResponder(uid, eventName, handler) {
13581358
return function(event) {
1359-
var cacheEntry = Event.cache[uid], element = cacheEntry.element;
1360-
1359+
var element = Event.cache[uid].element;
1360+
13611361
Event.extend(event, element);
13621362
var parent = event.relatedTarget;
13631363

0 commit comments

Comments
 (0)