Index: /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp	(revision 86830)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp	(revision 86831)
@@ -160,6 +160,6 @@
     const QHelpEngine* m_pHelpEngine;
     UIFindInPageWidget *m_pFindInPageWidget;
-    /* Initilized as false and set to true once the find widget is positioned during first resize. */
-    bool m_fFindWidgetPositioned;
+    /* Initilized as false and set to true once the user drag moves the find widget. */
+    bool m_fFindWidgetDragged;
     const int m_iMarginForFindWidget;
     /** Document positions of the cursors within the document for all matches. */
@@ -625,5 +625,5 @@
     , m_pHelpEngine(pHelpEngine)
     , m_pFindInPageWidget(new UIFindInPageWidget(this))
-    , m_fFindWidgetPositioned(false)
+    , m_fFindWidgetDragged(false)
     , m_iMarginForFindWidget(qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin))
     , m_iSelectedMatchIndex(0)
@@ -673,4 +673,9 @@
     if (!m_pFindInPageWidget)
         return;
+    /* Try to position the widget somewhere meaningful initially: */
+    if (!m_fFindWidgetDragged)
+        m_pFindInPageWidget->move(width() - m_iMarginForFindWidget - m_pFindInPageWidget->width(),
+                                  m_iMarginForFindWidget);
+
     m_pFindInPageWidget->setVisible(fVisible);
 
@@ -709,14 +714,9 @@
 void UIHelpBrowserViewer::resizeEvent(QResizeEvent *pEvent)
 {
+    /* Make sure the widget stays inside the parent during parent resize: */
     if (m_pFindInPageWidget)
     {
-        if (!m_fFindWidgetPositioned)
-        {
-            m_pFindInPageWidget->move(m_iMarginForFindWidget, m_iMarginForFindWidget);
-            m_fFindWidgetPositioned = true;
-        }
-        else
-            if (!isRectInside(m_pFindInPageWidget->geometry(), m_iMarginForFindWidget))
-                moveFindWidgetIn(m_iMarginForFindWidget);
+        if (!isRectInside(m_pFindInPageWidget->geometry(), m_iMarginForFindWidget))
+            moveFindWidgetIn(m_iMarginForFindWidget);
     }
     QIWithRetranslateUI<QTextBrowser>::resizeEvent(pEvent);
@@ -831,4 +831,5 @@
     if (isRectInside(geo, m_iMarginForFindWidget))
         m_pFindInPageWidget->move(m_pFindInPageWidget->pos() + delta);
+    m_fFindWidgetDragged = true;
     update();
 }
