From b02aee50d89d09d190c0c7713348a3023e9d7833 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 18 Oct 2010 19:31:44 -0700 Subject: [PATCH] In addition to mobile browser detection for styles, also do it for HTMLAreas and display a simple textarea instead. Fixes bug #11902. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Form/HTMLArea.pm | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 44c6e5fc2..60880eaf6 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,7 @@ - fixed #11913: Editing the survey doesn't work - fixed #11915: Date macro returns hour value w/ leading space - fixed #11901: NotifyAboutVersionTag includes URL, even when inappropriate + - fixed #11902: forums bug 7.10.2 - fixed #11884: Editing Templates impossible / Code editor not loaded diff --git a/lib/WebGUI/Form/HTMLArea.pm b/lib/WebGUI/Form/HTMLArea.pm index dde8131ea..b9378d158 100644 --- a/lib/WebGUI/Form/HTMLArea.pm +++ b/lib/WebGUI/Form/HTMLArea.pm @@ -183,7 +183,11 @@ Renders an HTML area field. sub toHtml { my $self = shift; - my $i18n = WebGUI::International->new($self->session); + ##Do not display a rich editor on any mobile browser. + if ($self->session->style->useMobileStyle) { + return $self->SUPER::toHtml; + } + my $i18n = WebGUI::International->new($self->session); my $richEdit = $self->{_richEdit}; $richEdit ||= WebGUI::Asset::RichEdit->new($self->session,$self->get("richEditId")); if (defined $richEdit) {