diff --git a/zephyr/jstemplates/actions_popover_content.html b/zephyr/jstemplates/actions_popover_content.html
index c4e90eb9fb..6a768af01c 100644
--- a/zephyr/jstemplates/actions_popover_content.html
+++ b/zephyr/jstemplates/actions_popover_content.html
@@ -12,7 +12,7 @@
{{#if narrowed}}
-
+
Narrow to messages around this time
diff --git a/zephyr/static/js/narrow.js b/zephyr/static/js/narrow.js
index 229c07af47..1b35152003 100644
--- a/zephyr/static/js/narrow.js
+++ b/zephyr/static/js/narrow.js
@@ -272,6 +272,12 @@ exports.by = function (operator, operand, opts) {
exports.activate([[operator, operand]], opts);
};
+// Helper function for the actions popover
+exports.from_popover = function (message_id) {
+ ui.hide_actions_popover();
+ exports.target(message_id);
+};
+
// This is the message we're about to select, within the narrowed view.
// But it won't necessarily be selected once the user un-narrows.
//