diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2018-04-26 11:33:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-26 11:33:48 -0400 |
commit | 8f12afb5996c58ddf41ceaa20f6c4e036273d3a6 (patch) | |
tree | cd45c70b01529e66f7af00c313c2a11da102c283 /app/javascript/flavours/glitch/components/status.js | |
parent | 1e9fe95e132361110431e8002a6b6ef5360c99a5 (diff) | |
parent | 003d1143320abf6421222f4cfd86f737fce08729 (diff) |
Merge pull request #438 from ThibG/glitch-soc/fixes/j-k-hotkeys-pinned
[Glitch] Fix the hot key (j, k) does not function correctly when ther…
Diffstat (limited to 'app/javascript/flavours/glitch/components/status.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/status.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index cf82c9ac6..120772201 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -253,12 +253,12 @@ export default class Status extends ImmutablePureComponent { this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`); } - handleHotkeyMoveUp = () => { - this.props.onMoveUp(this.props.containerId || this.props.id); + handleHotkeyMoveUp = e => { + this.props.onMoveUp(this.props.containerId || this.props.id, e.target.getAttribute('data-featured')); } - handleHotkeyMoveDown = () => { - this.props.onMoveDown(this.props.containerId || this.props.id); + handleHotkeyMoveDown = e => { + this.props.onMoveDown(this.props.containerId || this.props.id, e.target.getAttribute('data-featured')); } handleRef = c => { @@ -292,6 +292,7 @@ export default class Status extends ImmutablePureComponent { onOpenMedia, notification, hidden, + featured, ...other } = this.props; const { isExpanded } = this.state; @@ -426,6 +427,7 @@ export default class Status extends ImmutablePureComponent { {...selectorAttribs} ref={handleRef} tabIndex='0' + data-featured={featured ? 'true' : null} > <header className='status__info'> <span> |