[xiph-commits] r3574 - browser_plugin/trunk/test

conrad at svn.annodex.net conrad at svn.annodex.net
Tue Apr 29 03:38:50 PDT 2008


Author: conrad
Date: 2008-04-29 03:38:50 -0700 (Tue, 29 Apr 2008)
New Revision: 3574

Modified:
   browser_plugin/trunk/test/test.html
Log:
avoid the input widget in test.html firing hotkey'd functions.
Patch by ogg.k.ogg.k


Modified: browser_plugin/trunk/test/test.html
===================================================================
--- browser_plugin/trunk/test/test.html	2008-04-29 10:12:41 UTC (rev 3573)
+++ browser_plugin/trunk/test/test.html	2008-04-29 10:38:50 UTC (rev 3574)
@@ -100,7 +100,7 @@
 <tr valign="top">
 <td>
 Input<br>
-<input type="text" name="ifield" size="20"/><br>
+<input type="text" name="ifield" size="20" onfocus='input_focus=1;' onblur='input_focus=0;' /><br>
 <p style="margin-top:5;font-size:85%"><i>Space sets focus here</i></p>
 </td>
 <td width="50"></td>
@@ -144,6 +144,7 @@
 var input  = document.api.ifield;
 var output = document.api.ofield;
 var movies = document.setmovie.list;
+var input_focus = 0;
 
 function GetVersionString() {
   addOutput("Version: " + plugin.getVersionString());
@@ -415,6 +416,8 @@
   //  ---d---h------------u---y-
   //  -BCDE-GHIJK--N-PQRS-U-WXYZ
 
+  if (input_focus) return;
+
   switch (String.fromCharCode(e.which)) {
     case "p": Play();  break;
     case "q": Pause();  break;



More information about the commits mailing list