summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/urlbar/completionwidget.cpp2
-rw-r--r--src/urlbar/listitem.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index cf00a77c..e76c598d 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -351,6 +351,7 @@ void CompletionWidget::setVisible(bool visible)
void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button, Qt::KeyboardModifiers modifier)
{
+ hide();
if (button == Qt::MidButton
|| modifier == Qt::ControlModifier)
{
@@ -360,7 +361,6 @@ void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button, Qt::Ke
{
emit chosenUrl(item->url(), Rekonq::CurrentTab);
}
- hide();
}
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index f001c47b..52f05f1b 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -134,7 +134,7 @@ void ListItem::leaveEvent(QEvent *e)
void ListItem::mousePressEvent(QMouseEvent *e)
{
emit itemClicked(this, e->button(), e->modifiers());
- QWidget::mousePressEvent(e);
+ e->accept();
}