diff --git a/src/frontends/qt4/GuiHyperlink.cpp b/src/frontends/qt4/GuiHyperlink.cpp
index 07fe2c095a..d8ac0196c7 100644
--- a/src/frontends/qt4/GuiHyperlink.cpp
+++ b/src/frontends/qt4/GuiHyperlink.cpp
@@ -46,6 +46,8 @@ GuiHyperlink::GuiHyperlink(GuiView & lv)
setFocusProxy(targetED);
+ bc().setPolicy(ButtonPolicy::OkCancelReadOnlyPolicy);
+
bc().setOK(okPB);
bc().setCancel(closePB);
bc().addReadOnly(targetED);
diff --git a/src/frontends/qt4/ui/HyperlinkUi.ui b/src/frontends/qt4/ui/HyperlinkUi.ui
index d189385954..f5f19ac87b 100644
--- a/src/frontends/qt4/ui/HyperlinkUi.ui
+++ b/src/frontends/qt4/ui/HyperlinkUi.ui
@@ -139,6 +139,9 @@
&OK
+
+ true
+
true
@@ -149,6 +152,9 @@
&Close
+
+ false
+
diff --git a/src/frontends/qt4/ui/IncludeUi.ui b/src/frontends/qt4/ui/IncludeUi.ui
index b78526ea1a..0522d3d0af 100644
--- a/src/frontends/qt4/ui/IncludeUi.ui
+++ b/src/frontends/qt4/ui/IncludeUi.ui
@@ -239,6 +239,9 @@
true
+
+ true
+
-
@@ -246,6 +249,9 @@
&Close
+
+ false
+
diff --git a/status.16x b/status.16x
index 7093a90d0c..948591c83d 100644
--- a/status.16x
+++ b/status.16x
@@ -77,6 +77,9 @@ What's new
- Do not close the math delimiters dialog when selecting a delimiter
without "match" being chosen (bug 5789).
+- Ensure that in various dialogs the OK button is the default when both
+ the OK and Cancel buttons are enabled (bug 5695).
+
* DOCUMENTATION AND LOCALIZATION