Merge pull request #32135 from overleaf/mg-comment-empty-select

Allow adding comments on empty selection

GitOrigin-RevId: 14e742bb563fab99624be860691f1a9d2dabc00e
This commit is contained in:
Malik Glossop
2026-03-20 09:07:28 +00:00
committed by Copybot
parent 504005aa74
commit 6901a2a8de
9 changed files with 238 additions and 13 deletions
@@ -239,7 +239,7 @@ describe('editor context menu', { scrollBehavior: false }, function () {
})
describe('when nothing is selected', function () {
it('should enable Cut, Copy, Paste, Suggest edits and disable Delete, Comment', function () {
it('should enable Cut, Copy, Paste, Suggest edits, Comment and disable Delete', function () {
const scope = mockScope()
cy.mount(
@@ -269,11 +269,7 @@ describe('editor context menu', { scrollBehavior: false }, function () {
'aria-disabled',
'true'
)
cy.findByRole('menuitem', { name: /comment/i }).should(
'have.attr',
'aria-disabled',
'true'
)
cy.findByRole('menuitem', { name: /comment/i }).should('be.enabled')
cy.findByRole('menuitem', { name: /suggest edits/i }).should(
'be.enabled'
)