From b1ff0b9e656ea4881912d0facb5813f9e8f2ab6e Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 23 Apr 2017 01:00:25 +0100 Subject: [PATCH] hook up keyb shortcuts for roomdir --- src/components/structures/RoomDirectory.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index e723cf1a..937104c7 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -23,7 +23,6 @@ var ContentRepo = require("matrix-js-sdk").ContentRepo; var Modal = require('matrix-react-sdk/lib/Modal'); var sdk = require('matrix-react-sdk'); var dis = require('matrix-react-sdk/lib/dispatcher'); -var GeminiScrollbar = require('react-gemini-scrollbar'); var linkify = require('linkifyjs'); var linkifyString = require('linkifyjs/string'); @@ -460,6 +459,17 @@ module.exports = React.createClass({ return fields; }, + /** + * called by the parent component when PageUp/Down/etc is pressed. + * + * We pass it down to the scroll panel. + */ + handleScrollKey: function(ev) { + if (this.scrollPanel) { + scrollPanel.handleScrollKey(ev); + } + }, + render: function() { const SimpleRoomHeader = sdk.getComponent('rooms.SimpleRoomHeader'); const Loader = sdk.getComponent("elements.Spinner");