Skip to content

Commit

Permalink
following: stop when using formulabar
Browse files Browse the repository at this point in the history
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I711654ef51ff2c89d34dbdaf6a3024799c5f1428
  • Loading branch information
eszkadev committed Mar 4, 2025
1 parent a527882 commit 1817cc9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
8 changes: 6 additions & 2 deletions browser/src/control/Control.FormulaBarJSDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,17 @@ class FormulaBar {

// in the core we have DrawingArea not TextView
if (object.id.indexOf('sc_input_window') === 0) {
const map = builder.map;
objectType = 'drawingarea';

if (eventType === 'keypress' && data === UNOKey.RETURN || data === UNOKey.ESCAPE)
builder.map.focus();
map.focus();
else if (eventType === 'grab_focus') {
this.focusField();
builder.map.onFormulaBarFocus();
map.onFormulaBarFocus();
}

map.userList.followUser(map._docLayer._getViewId(), false);
}

builder._defaultCallbackHandler(objectType, eventType, object, data, builder);
Expand Down
15 changes: 15 additions & 0 deletions cypress_test/integration_tests/multiuser/calc/following_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,19 @@ describe(['tagmultiuser'], 'Check following the other views', function() {
// following is off
cy.cGet('#followingChip').should('not.be.visible');
});

it('Stop following on formulabar', function() {
// second view follow the first one
cy.cSetActiveFrame('#iframe2');
cy.cGet('#userListHeader').click();
cy.cGet('.user-list-item').eq(1).click();
cy.cGet('.jsdialog-overlay').should('not.exist');

// second view activates the formulabar
cy.cGet('#followingChip').should('be.visible');
cy.cGet('#sc_input_window').click();

// following is off
cy.cGet('#followingChip').should('not.be.visible');
});
});

0 comments on commit 1817cc9

Please sign in to comment.