svnno****@sourc*****
svnno****@sourc*****
2011年 8月 31日 (水) 23:16:17 JST
Revision: 2906 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2906 Author: dhrname Date: 2011-08-31 23:16:17 +0900 (Wed, 31 Aug 2011) Log Message: ----------- EventのpreventDefaultメソッドが正常に作動しないバグを修正 Modified Paths: -------------- branches/08x/084/org/w3c/dom/events.js Modified: branches/08x/084/org/w3c/dom/events.js =================================================================== --- branches/08x/084/org/w3c/dom/events.js 2011-08-31 13:59:55 UTC (rev 2905) +++ branches/08x/084/org/w3c/dom/events.js 2011-08-31 14:16:17 UTC (rev 2906) @@ -270,9 +270,11 @@ this._stop = true; }, /*void*/ preventDefault : function(){ - this._default = false; - /*IEのみで使えるreturnValueプロパティ*/ - window.event.returnValue = false; + if (this.cancelable) { + this._default = false; + /*IEのみで使えるreturnValueプロパティ*/ + this.target.ownerDocument._window.event.returnValue = false; + } }, /*void*/ initEvent : function( /*string*/ eventTypeArg, /*boolean*/ canBubbleArg, /*boolean*/ cancelableArg) { this.type = eventTypeArg;