Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

following: stop when using formulabar #11265

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
});
});