Skip to content

Fixed ghost tabs issue#15191

Open
misespuneraul wants to merge 1 commit intoCollaboraOnline:mainfrom
misespuneraul:ghost-tabs
Open

Fixed ghost tabs issue#15191
misespuneraul wants to merge 1 commit intoCollaboraOnline:mainfrom
misespuneraul:ghost-tabs

Conversation

@misespuneraul
Copy link
Copy Markdown

@misespuneraul misespuneraul commented Mar 24, 2026

Change-Id: Iecdb07c3708127d4d3eb134508cfd2a02db4c6b9

  • Resolves: #
  • Target version: main

Summary

Context-dependent tabs (such as Master in Impress, Table, Shape) lose the hidden class when selected but did not gain it back when deselected, which made them accessible with arrow key navigation even if they didn't appear in the tab list on top of the screen. The fix makes sure they properly get the hidden class when their context is not met anymore.

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@misespuneraul misespuneraul requested a review from caolanm March 24, 2026 11:54
@misespuneraul misespuneraul marked this pull request as draft March 24, 2026 12:47
@misespuneraul misespuneraul marked this pull request as ready for review March 24, 2026 14:04
Signed-off-by: Raul-Ionut Nastasie <raul-ionut.nastasie@collabora.com>
Change-Id: Iecdb07c3708127d4d3eb134508cfd2a02db4c6b9
Copy link
Copy Markdown
Contributor

@caolanm caolanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not completely clear from the commit message what the original problem to solve is, especially if it needs to be revisited in the future. Be a bit more verbose there, "click X, Y Z and then foo happened when actually bar should happen instead"

if (!this._isMasterVisible && requestedContext === 'MasterPage') {
this._isMasterVisible = true;
} else if (this._isMasterVisible && anotherPageContext) {
this._isMasterVisible = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might already have the information that the masterview is active? There are other places that use e.g.:

var isMasterView = this._map['stateChangeHandler'].getItemValue('.uno:SlideMasterPage');

which checks what core last reported for the master page state. Would that work as an alternative?

Copy link
Copy Markdown
Author

@misespuneraul misespuneraul Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried using the snippet you gave and it doesn't seem to work properly: if you turn master view on, then select a text box for example the master tab disappears.

Copy link
Copy Markdown
Author

@misespuneraul misespuneraul Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i also looked investigated the object a bit and printing it in the updateTabsVisibility method it does not seem to have anything in _items named SlideMasterPage. Printing the variable you sent me using console.log therefore prints "undefined"

// Currently selected tab name, part of the element's ID.
let currentlySelectedTabName = null;

var anotherPageContext = requestedContext.endsWith('Page') && requestedContext !== 'MasterPage';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What contexts end in Page but are not MasterPage?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the one I found is DrawPage, that gets called when Master view is toggled off. I suspected there might be more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Review

Development

Successfully merging this pull request may close these issues.

2 participants