[editarea] Include IE9 fix
Colin Coe
coec at fedoraproject.org
Tue Apr 10 12:11:07 UTC 2012
commit ce63cea32e9184d269b85e9bd2ee557005f86418
Author: Colin Coe <colin.coe at gmail.com>
Date: Tue Apr 10 20:11:00 2012 +0800
Include IE9 fix
editarea-0.8.2-support-ie9.patch | 41 ++++++++++++++++++++++++++++++++++++++
editarea.spec | 7 +++++-
2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/editarea-0.8.2-support-ie9.patch b/editarea-0.8.2-support-ie9.patch
new file mode 100644
index 0000000..0b4b3af
--- /dev/null
+++ b/editarea-0.8.2-support-ie9.patch
@@ -0,0 +1,41 @@
+diff -uNr editarea.old/edit_area/edit_area.css editarea/edit_area/edit_area.css
+--- editarea.old/edit_area/edit_area.css 2010-01-14 01:56:34.000000000 -0500
++++ editarea/edit_area/edit_area.css 2012-04-09 17:27:12.995918527 -0400
+@@ -143,7 +143,7 @@
+ }
+
+ .hidden{
+- opacity: 0.2;
++ opacity: 0;
+ filter:alpha(opacity=20);
+ }
+
+diff -uNr editarea.old/edit_area/manage_area.js editarea/edit_area/manage_area.js
+--- editarea.old/edit_area/manage_area.js 2010-01-14 01:56:34.000000000 -0500
++++ editarea/edit_area/manage_area.js 2012-04-09 17:29:33.775855141 -0400
+@@ -200,11 +200,14 @@
+ return sel;
+ };
+
++ // IE < 9
++ var need_createRange = !("selectionStart" in document.createElement("textarea"));
++
+ // set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd)
+ EditArea.prototype.getIESelection= function(){
+ var selectionStart, selectionEnd, range, stored_range;
+
+- if( !this.isIE )
++ if( !this.isIE || !need_createRange )
+ return false;
+
+ // make it work as nowrap mode (easier for range manipulation with lineHeight)
+@@ -246,7 +249,7 @@
+ EditArea.prototype.setIESelection= function(){
+ var a = this.textarea, nbLineStart, nbLineEnd, range;
+
+- if( !this.isIE )
++ if( !this.isIE || !need_createRange )
+ return false;
+
+ nbLineStart = a.value.substr(0, a.selectionStart).split("\n").length - 1;
+
diff --git a/editarea.spec b/editarea.spec
index 9000932..00ea983 100644
--- a/editarea.spec
+++ b/editarea.spec
@@ -2,7 +2,7 @@
Name: editarea
Version: %(echo %{_version} | sed 's/_/./g')
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A replacement for the HTML textarea tag
Group: Applications/Internet
@@ -13,6 +13,7 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}_%{_version}.zip
Source1: %{name}.conf
Patch0: editarea-fix_path.patch
Patch1: editarea_0_8_2-bash.patch
+Patch2: editarea-0.8.2-support-ie9.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: httpd
BuildArch: noarch
@@ -28,6 +29,7 @@ and more. EditArea is not a WYSIWYG editor.
sed -i 's/\r//' ./todo.txt ./license_bsd.txt ./change_log.txt ./license_apache.txt ./docs/doc_style.css
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
# Nothing to build
@@ -58,6 +60,9 @@ rm -rf $RPM_BUILD_ROOT
%doc docs examples
%changelog
+* Tue Apr 10 2012 Colin Coe <colin.coe at gmail.com> - 0.8.2-5
+- Include IE9 fix as supplied by Stephen Herr
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list