mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Use Ctrl+Shift+C for the add-comment shortcut while keeping Cmd+Shift+C active (#32624)
GitOrigin-RevId: 5fdf9ae7dd0fa194c3ac6acf9abb70ac9721fd2e
This commit is contained in:
@@ -119,7 +119,12 @@ export const shortcuts = Prec.high(
|
||||
run: toggleReviewPanel,
|
||||
},
|
||||
{
|
||||
key: 'Mod-Shift-c',
|
||||
key: 'Ctrl-Shift-c',
|
||||
preventDefault: true,
|
||||
run: addNewCommentFromKbdShortcut,
|
||||
},
|
||||
{
|
||||
key: 'Cmd-Shift-c',
|
||||
preventDefault: true,
|
||||
run: addNewCommentFromKbdShortcut,
|
||||
},
|
||||
|
||||
+14
@@ -75,6 +75,20 @@ describe('keyboard shortcuts', { scrollBehavior: false }, function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('dispatches add comment with {ctrl+shift+c}', function () {
|
||||
cy.window().then(win => {
|
||||
win.addEventListener('add-new-review-comment', cy.stub().as('addComment'))
|
||||
})
|
||||
|
||||
cy.get('@editor').trigger('keydown', {
|
||||
key: 'c',
|
||||
ctrlKey: true,
|
||||
shiftKey: true,
|
||||
})
|
||||
|
||||
cy.get('@addComment').should('have.been.calledOnce')
|
||||
})
|
||||
|
||||
it('indent line with {tab}', function () {
|
||||
cy.get('@line').trigger('keydown', { key: 'Tab' })
|
||||
cy.get('@line').should('have.text', ' ')
|
||||
|
||||
Reference in New Issue
Block a user