svnno****@sourc*****
svnno****@sourc*****
2010年 10月 4日 (月) 23:22:39 JST
Revision: 2038 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2038 Author: dhrname Date: 2010-10-04 23:22:39 +0900 (Mon, 04 Oct 2010) Log Message: ----------- dispatchEventメソッドを修正 Modified Paths: -------------- branches/06x/061/org/w3c/dom/events.js Modified: branches/06x/061/org/w3c/dom/events.js =================================================================== --- branches/06x/061/org/w3c/dom/events.js 2010-10-03 14:10:33 UTC (rev 2037) +++ branches/06x/061/org/w3c/dom/events.js 2010-10-04 14:22:39 UTC (rev 2038) @@ -155,13 +155,13 @@ * */ for (var i=0, n=1, d=0, tce = null, sli = s.length, slii = sli*2-1;i<slii;++i){ - d = sli - i; + d = sli - i - 1; if (d === 0){ //イベントのターゲットに到着(折り返し地点) n = -1; evt.eventPhase = 2;//Event.AT_TARGET; evt.currentTarget = evt.target; } else { - evt.currentTarget = s[d*n-1]; + evt.currentTarget = s[d*n]; } tce = evt.currentTarget._capter; //tceは登録しておいたリスナーのリスト for (var j=0,tcli=tce.length;j<tcli;++j){ @@ -178,11 +178,10 @@ break; //浮上フェーズに移行せず、停止する } evt.eventPhase = 3;//Event.BUBBLING_PHASE; - ++i; } } var ed = evt._default - evt = te = s = d = tce = n = sli = slii = null; + evt = te = s = d = tce = n = sli = slii = dn = null; return ed; };