Bug 163876 - Calc clears current cell when switching between app windows with CMD+backtick
Summary: Calc clears current cell when switching between app windows with CMD+backtick
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All macOS (All)
: medium normal
Assignee: Patrick (volunteer)
URL:
Whiteboard: target:25.2.0 target:24.8.4
Keywords:
Depends on:
Blocks: Shortcuts-Accelerators
  Show dependency treegraph
 
Reported: 2024-11-13 06:04 UTC by Axel
Modified: 2024-11-28 20:59 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel 2024-11-13 06:04:29 UTC
Description:
When I want to switch between open files (CALC), the active cell is emptied.

Steps to Reproduce:
1.open a CALC file
2.open another CALC file
3.swtich between the 2 files when cursor is on a non empty cell
4.

Actual Results:
the current cell on the cell on which the cursor is located before switching is emptied

Expected Results:
Just switch between open files 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 16; OS: macOS 14.6.1; UI render: Skia/Metal; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 1 Patrick (volunteer) 2024-11-13 14:41:09 UTC
I cannot reproduce this on my Silicon Mac:

Version: 24.8.2.1 (AARCH64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: macOS 15.1; UI render: Skia/Metal; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded

Here are the steps I used:

1. When I entered text without pressing Enter in either a cell or in the edit field in the toolbar
2. When I put the cursor in an existing text in either a cell or in the edit field in the toolbar

In both of the above cases, when I pressed Command-` the text was preserved similar to pressing Enter.

I did the above steps with both a US QWERTY keyboard layout. Am I missing some step?
Comment 2 Axel 2024-11-13 15:08:12 UTC
I'm on Intel i9 (2019) MacOs Sonoma up-to-date 2,4 GHz Intel Core i9 + Radeon 5300m

Command + `is not used for validating the cell. Just for switching between to windows of the app.

Before this, I've just validated my cell with "Enter".
After reboot, same issue. The cell is cleared when I jump to the other file.

Something I missed previously in my details : the 2 files are both .CSV
Comment 3 Patrick (volunteer) 2024-11-13 18:46:41 UTC
(In reply to Patrick (volunteer) from comment #1)
> I did the above steps with both a US QWERTY keyboard layout. Am I missing
> some step?

I can now reproduce this bug. It occurs with a French keyboard layout but not with a US QWERTY keyboard layout.

Note: if I press and hold Command-` to cycle through two Calc documents, the bug does not appear until the second cycle through.

I will need to investigate and see if I can find what is causing different keyboard layouts to behave differently with the same key event.
Comment 4 Axel 2024-11-14 07:17:17 UTC
well done ! Good luck
Comment 5 Commit Notification 2024-11-15 17:11:57 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0c065c5e233044361713c0003dac6294a82a6e6e

tdf#163876 ignore marked text generated from Command-` events

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Patrick (volunteer) 2024-11-15 17:15:34 UTC
I have committed a fix for this bug. The fix will be in tomorrow's (15 November 2024) nightly master builds:

https://dev-builds.libreoffice.org/daily/master/current.html

Note for macOS testers: the nightly master build installer does not overwrite any LibreOffice official versions. Instead, it will be installed as a separate application called "LibreOfficeDev" in the /Applications folder.

Because this is a "test" build, you will need to do the following steps before you launch the LibreOfficeDev application:

1. Go to the Finder and navigate to the /Applications/Utilities folder
2. Launch the "Terminal" application
3. Paste the following command in the Terminal application window and press the Return key to execute the command:

   xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app
Comment 7 Axel 2024-11-16 07:04:44 UTC
I've downloaded MacOSX-x86_64@tb94-TDF	2024-11-12 17:29:42 and applied your procedure.
Issue still present : when cmd+`, cell is emptied
Comment 8 BogdanB 2024-11-16 10:55:32 UTC
(In reply to Axel from comment #7)
> I've downloaded MacOSX-x86_64@tb94-TDF	2024-11-12 17:29:42 and applied your
> procedure.
> Issue still present : when cmd+`, cell is emptied

The patch was in the code just in 15.11.2024, and you tested on an older version. Please wait to be available a version newer than 15.11.2024.
Comment 9 Patrick (volunteer) 2024-11-16 15:11:20 UTC
(In reply to Patrick (volunteer) from comment #6)
> I have committed a fix for this bug. The fix will be in tomorrow's (15
> November 2024) nightly master builds:
> 
> https://dev-builds.libreoffice.org/daily/master/current.html

Oops. I wrote the wrong date. It is in today's (16 November 2024) nightly master build.
Comment 10 Axel 2024-11-18 06:07:01 UTC
can you please share the link ?
Nothing dated at 16th on the given URL
https://dev-builds.libreoffice.org/daily/master/current.html
Thanks
Comment 11 Axel 2024-11-18 06:07:41 UTC
... for Mac X86 64
Comment 12 Patrick (volunteer) 2024-11-18 13:05:22 UTC
(In reply to Axel from comment #10)
> can you please share the link ?
> Nothing dated at 16th on the given URL
> https://dev-builds.libreoffice.org/daily/master/current.html
> Thanks

The nightly master builds are rebuilt once each day and replace the previous day's builds. So just download the latest. As long as it has a date later than 16 November 2024, it will include my fix.
Comment 13 Axel 2024-11-18 14:23:16 UTC
I confirm - if needed - that the issue is fixed. It's gonna help a lot Thanks
Comment 14 Commit Notification 2024-11-28 20:59:39 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/c68355376f155018eabbf4cffeaa18e06c634562

tdf#163876 ignore marked text generated from Command-` events

It will be available in 24.8.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.