From 4daaa09438bc05f9d5d6cf339cc0b60b511057e9 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 06 Oct 2013 09:02:25 -0400
Subject: [PATCH] Move PEAR libs from plugins into main Roundcube lib directory, list them as dependencies in INSTALL file (#1489182)

---
 program/js/tiny_mce/plugins/autolink/editor_plugin_src.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js b/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js
index 8c1cd68..c05fbbc 100644
--- a/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js
@@ -89,8 +89,11 @@
 					while (endContainer.nodeType != 3 && endContainer.firstChild)
 						endContainer = endContainer.firstChild;
 
-					r.setStart(endContainer, 0);
-					r.setEnd(endContainer, endContainer.nodeValue.length);
+					// Move range to text node
+					if (endContainer.nodeType == 3) {
+						r.setStart(endContainer, 0);
+						r.setEnd(endContainer, endContainer.nodeValue.length);
+					}
 				}
 
 				if (r.endOffset == 1)

--
Gitblit v1.9.1