Skip to content
Snippets Groups Projects
Commit b703a53b authored by Lukas Haase's avatar Lukas Haase
Browse files

cherry pick qr code

parent 315def32
Branches
Tags
No related merge requests found
......@@ -8,7 +8,7 @@ export class QuestionWallKeyEventSupport {
window.addEventListener('keyup', this.windowEvent = e => {
if (this.keyMap.has(e.key)) {
this.keyMap.get(e.key)();
e.preventDefault();
e.cancelBubble = true;
}
});
}
......
......@@ -169,19 +169,9 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy {
initKeySupport() {
this.wrap(this.keySupport, key => {
const checkSideList=()=>{
if(!this.sidelistExpanded){
this.toggleSideList();
}
}
const zip=(a,b)=>{
a();
b();
}
const zipSideList=a=>()=>zip(()=>checkSideList(),()=>a());
key.addKeyEvent('ArrowRight', zipSideList(() => this.nextComment()));
key.addKeyEvent('ArrowLeft', zipSideList(() => this.prevComment()));
key.addKeyEvent(' ', zipSideList(() => this.nextComment()));
key.addKeyEvent('ArrowRight', () => this.nextComment());
key.addKeyEvent('ArrowLeft', () => this.prevComment());
key.addKeyEvent(' ', () => this.nextComment());
});
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment