linterna-magica-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linterna-magica-commit] [194] Working code for tasks #11312.


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [194] Working code for tasks #11312.
Date: Fri, 02 Sep 2011 11:26:59 +0000

Revision: 194
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=194
Author:   valkov
Date:     2011-09-02 11:26:58 +0000 (Fri, 02 Sep 2011)
Log Message:
-----------
Working code for tasks #11312.

Ticket Links:
------------
    http://savannah.gnu.org/task/?11312

Modified Paths:
--------------
    trunk/src/lm_interface_hd_links.js

Modified: trunk/src/lm_interface_hd_links.js
===================================================================
--- trunk/src/lm_interface_hd_links.js  2011-08-26 08:13:58 UTC (rev 193)
+++ trunk/src/lm_interface_hd_links.js  2011-09-02 11:26:58 UTC (rev 194)
@@ -27,7 +27,7 @@
 
 // END OF LICENSE HEADER
 
-// Event listenr function that configs the video object
+// Event listener function that configs the video object
 // for HD links
 LinternaMagica.prototype.switch_to_hd_link = function(event, element)
 {
@@ -101,6 +101,30 @@
        if (display)
        {
            hd_list.style.removeProperty("display");
+
+           var hd_list_blur_function = function(ev)
+           {
+               var timeout_function = function()
+               {
+                   if (document.activeElement &&
+                       document.activeElement.hasAttribute("id") &&
+                       document.activeElement.getAttribute("id") 
+                       != "linterna-magia-selected-hd-link-0")
+                   {
+                       hd_list.style.setProperty("display", 
+                                                 "none", "important");
+                   }
+                   element.removeEventListener("blur",
+                                               hd_list_blur_function,
+                                               true);
+               };
+
+               // Wait for the selected link to become the
+               // document.activeElement.
+               setTimeOut(timeout_function, 250);
+           };
+
+           element.addEventListener("blur", hd_list_blur_function, true);
        }
        else
        {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]