diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 7a5e19dfea891d0e2147950a37f88449327ac8a1..28142dc7101bc9c811d00cee1f54f887854bdc8d 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -804,16 +804,20 @@ void HelpPlugin::activateContext()
                 viewer->stop();
 #endif
                 viewer->setSource(source);
-            }
-            viewer->setFocus();
-            connect(viewer, SIGNAL(loadFinished(bool)), this,
-                SLOT(highlightSearchTerms()));
+                connect(viewer, SIGNAL(loadFinished(bool)), this,
+                    SLOT(highlightSearchTerms()));
 
-            if (source.toString().remove(source.fragment())
-                == oldSource.toString().remove(oldSource.fragment())) {
-                    highlightSearchTerms();
+                if (source.toString().remove(source.fragment())
+                    == oldSource.toString().remove(oldSource.fragment())) {
+                        highlightSearchTerms();
+                }
+            } else {
+#if !defined(QT_NO_WEBKIT)
+                viewer->page()->mainFrame()->scrollToAnchor(source.fragment());
+#endif
             }
         }
+        viewer->setFocus();
     }
 }
 
@@ -951,7 +955,7 @@ void HelpPlugin::highlightSearchTerms()
             if (attrValue == name || name.startsWith(attrValue + QLatin1Char('-'))) {
                 QWebElement parent = element.parent();
                 m_styleProperty = parent.styleProperty(property,
-                    QWebElement::InlineStyle);
+                    QWebElement::ComputedStyle);
                 parent.setStyleProperty(property, QLatin1String("yellow"));
             }
         }