From c958452d098be0cedf39e96a1ea29b1b5f265067 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 29 Apr 2013 04:43:13 -0400
Subject: [PATCH] Catch possible "Permission denied" error on iframe elements in IE

---
 skins/larry/ui.js |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index 1c76f91..a461b64 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -251,8 +251,13 @@
 
     $('iframe').load(function(e){
       // this = iframe
-      var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
-      $(doc).mouseup(body_mouseup);
+      try {
+        var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
+        $(doc).mouseup(body_mouseup);
+      }
+      catch (e) {
+        // catch possible "Permission denied" error in IE
+      };
     })
     .contents().mouseup(body_mouseup);
 

--
Gitblit v1.9.1