Changeset 7928
- Timestamp:
- 10/16/07 03:36:58 (11 months ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/src/event.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/trunk/CHANGELOG
r7927 r7928 1 1 *SVN* 2 3 * Don't translate "keypress" events into "keydown" events. [sam] 4 Note: "keypress" is broken in Safari <= 2.x, but Event#stop has no effect on "keydown" events. 2 5 3 6 * Changed Element#makeClipping to remember the original overflow value, even if it's a non-inline style. [Andrew Dupont] spinoffs/prototype/trunk/src/event.js
r7926 r7928 31 31 32 32 Event.Methods = (function() { 33 // mouse button detection is terribly inconsistent34 33 if (Prototype.Browser.IE) { 35 var isButton = function(event, code) { 36 return event.button == ({ 0:1, 1:4, 2:2 })[code]; 37 }; 34 function isButton(event, code) { 35 return event.button == ({ 0: 1, 1: 4, 2: 2 })[code]; 36 } 37 38 38 } else if (Prototype.Browser.WebKit) { 39 var isButton = function(event, code) {39 function isButton(event, code) { 40 40 switch (code) { 41 41 case 0: return event.which == 1 && !event.metaKey; … … 43 43 default: return false; 44 44 } 45 }; 45 } 46 46 47 } else { 47 var isButton = function(event, code) {48 function isButton(event, code) { 48 49 return event.which ? (event.which === code + 1) : (event.button === code); 49 } ;50 } 50 51 } 51 52 … … 130 131 function getDOMEventName(eventName) { 131 132 if (eventName && eventName.match(/:/)) return "dataavailable"; 132 return { keypress: "keydown" }[eventName] ||eventName;133 return eventName; 133 134 } 134 135