diff --git a/lib/WebGUI/Form/HTMLArea.pm b/lib/WebGUI/Form/HTMLArea.pm
index b90b2ef2a..fee001c30 100644
--- a/lib/WebGUI/Form/HTMLArea.pm
+++ b/lib/WebGUI/Form/HTMLArea.pm
@@ -187,7 +187,7 @@ Renders an HTML area field.
sub toHtml {
my $self = shift;
##Do not display a rich editor on any mobile browser.
- if ($self->session->style->mobileBrowser) {
+ if ($self->session->request->browser->mobile) {
return $self->SUPER::toHtml;
}
my $i18n = WebGUI::International->new($self->session);
diff --git a/lib/WebGUI/Session/Style.pm b/lib/WebGUI/Session/Style.pm
index 18a02af19..92fe74b7e 100644
--- a/lib/WebGUI/Session/Style.pm
+++ b/lib/WebGUI/Session/Style.pm
@@ -110,25 +110,6 @@ sub makePrintable {
#-------------------------------------------------------------------
-=head2 mobileBrowser ( )
-
-Returns true if the user's browser matches any of the mobile browsers set in the config file.
-
-=cut
-
-sub mobileBrowser {
- my $self = shift;
- my $session = $self->session;
- my $ua = $session->env->get('HTTP_USER_AGENT');
- for my $mobileUA (@{ $session->config->get('mobileUserAgents') }) {
- if ($ua =~ m/$mobileUA/) {
- return 1;
- }
- }
-}
-
-#-------------------------------------------------------------------
-
=head2 useMobileStyle
Returns a true value if we are on a mobile display.