[Bbs2ch-cvs 379] [361] ブラウザへのイベントフロー抑制

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 2月 8日 (金) 23:46:13 JST


Revision: 361
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=361
Author:   flyson
Date:     2008-02-08 23:46:12 +0900 (Fri, 08 Feb 2008)

Log Message:
-----------
ブラウザへのイベントフロー抑制

Modified Paths:
--------------
    trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js
    trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.xul


-------------- next part --------------
Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js
===================================================================
--- trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js	2008-02-08 14:26:55 UTC (rev 360)
+++ trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.js	2008-02-08 14:46:12 UTC (rev 361)
@@ -67,6 +67,15 @@
 }
 
 
+/**
+ * ブラウザへのイベントフロー抑制
+ */
+function eventBubbleCheck(aEvent){
+	// オートスクロールや Find As You Type を抑制しつつキーボードショートカットを許可
+	if(!(aEvent.ctrlKey || aEvent.shiftKey || aEvent.altKey || aEvent.metaKey))
+		aEvent.stopPropagation();
+}
+
 function vacuum(){
 document.getElementById("vacuumButton").disabled = true;
 	setTimeout("delayVacuum()", 0);

Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.xul
===================================================================
--- trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.xul	2008-02-08 14:26:55 UTC (rev 360)
+++ trunk/bbs2chreader/chrome/content/bbs2chreader/board/log-manager.xul	2008-02-08 14:46:12 UTC (rev 361)
@@ -3,6 +3,7 @@
 <?xml-stylesheet href="chrome://bbs2chreader/skin/board-page.css" type="text/css"?>
 
 <page id="logManager" title="Log Manager [bbs2chreader]"
+	onmousedown="eventBubbleCheck(event)" onkeypress="eventBubbleCheck(event)"
 	onload="startup()" onunload="shutdown()"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 


bbs2ch-cvs メーリングリストの案内
Back to archive index