Bug 162843 - Allow paste into Find/Replace box with Dvorak/QWERTY keyboard?
Summary: Allow paste into Find/Replace box with Dvorak/QWERTY keyboard?
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.7.2 release
Hardware: All macOS (All)
: medium normal
Assignee: Patrick (volunteer)
URL:
Whiteboard: target:25.2.0 target:24.8.3
Keywords:
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2024-09-08 01:46 UTC by John Rethorst
Modified: 2024-10-14 04:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Response to question: switching keyboard layout? (513 bytes, text/plain)
2024-09-26 03:36 UTC, John Rethorst
Details
About box for Libreoffice 24.8.2.1 Mac Intel (278.24 KB, image/jpeg)
2024-10-01 15:57 UTC, John Rethorst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Rethorst 2024-09-08 01:46:08 UTC
Similar to request 101958: can we select text in the document and copy it, then open Find/Replace, click in the Find or Replace box to activate it, and paste the clipboard into the box? At present, choosing Paste puts the text into the document behind Find/Replace. It would be a timesaver to select and copy text to search for, later in the document. 

Thank you, 
John Rethorst
Comment 1 Buovjaga 2024-09-08 06:33:52 UTC
Bug 101958 involves switching the keyboard layout. Is this the case here as well?
Comment 2 John Rethorst 2024-09-26 03:36:52 UTC
Created attachment 196704 [details]
Response to question: switching keyboard layout?
Comment 3 Buovjaga 2024-09-26 05:17:09 UTC
(In reply to John Rethorst from comment #2)
> Created attachment 196704 [details]
> Response to question: switching keyboard layout?

For some reason the reply was provided in a text file instead of a comment, so copying here:

> No switching the keyboard layout. 
> My report is better described as an enhancement request than a bug. Pasting into the Find / Replace box can be very convenient.

Bug 101958 is about Calc and the Quick Find toolbar while this is about Writer and the Find & Replace dialog, so I suppose the behaviour might be different. In any case, this would *not* be an enhancement as it is expected for pasting into the fields to work and it certainly works on Windows and Linux. We need other macOS users to test this.
Comment 4 John Rethorst 2024-09-26 16:02:11 UTC
Sorry for mislocating my reply. Good idea that other macOS users test this. I can replicate it over multiple restarts etc., on Intel iMac on Sonoma, OS 14.7. 

Thank you, 
John

> Bug 101958 is about Calc and the Quick Find toolbar while this is about Writer
and the Find & Replace dialog, so I suppose the behaviour might be different.
In any case, this would *not* be an enhancement as it is expected for pasting
into the fields to work and it certainly works on Windows and Linux. We need
other macOS users to test this.
Comment 5 Patrick (volunteer) 2024-09-26 17:48:34 UTC
I cannot reproduce this bug with LibreOffice 24.8.1.2 on my Mac Silicon laptop running macOS Sequoia. I can paste into either the Find or Replace fields in Writer's Find & Replace dialog using either Command-V or the Edit > Paste menu item:

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

The bug, however, does occur in the older Mac App Store version of LibreOffice 24.2.5.2. Not sure why 24.2.6 has not yet been released in the Mac App Store as 24.2.6 should have the same key shortcut and menu fixes (e.g. https://gerrit.libreoffice.org/c/core/+/170878) as 24.8.1:
 
Version: 24.2.5.2 (AARCH64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: macOS 15.0; UI render: Skia/Metal; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded
Comment 6 Buovjaga 2024-09-26 17:54:11 UTC
Thanks, let's close as dupe.

*** This bug has been marked as a duplicate of bug 162010 ***
Comment 7 John Rethorst 2024-10-01 00:21:24 UTC
I just upgraded to 24.8.2.1, copied a word from body text of a Writer document, opened the Find box and tried to paste, and could not. Tried again with the Find and Replace dialog, and could not paste anything. Intel Mac, OS 14.7. 

Thank you, 
John
Comment 8 Patrick (volunteer) 2024-10-01 00:40:11 UTC
(In reply to John Rethorst from comment #7)
> I just upgraded to 24.8.2.1, copied a word from body text of a Writer
> document, opened the Find box and tried to paste, and could not. Tried again
> with the Find and Replace dialog, and could not paste anything. Intel Mac,
> OS 14.7.

Huh. I am not seeing what you see. I wonder what the difference is?:

Version: 24.8.2.1 (AARCH64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: macOS 15.0; UI render: Skia/Metal; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded
Comment 9 Buovjaga 2024-10-01 03:51:42 UTC
John: please copy and paste here the content of your LibreOffice - About by clicking the copy button. This allows us to know more about your system.
Comment 10 John Rethorst 2024-10-01 15:57:39 UTC
Created attachment 196825 [details]
About box for Libreoffice 24.8.2.1 Mac Intel
Comment 11 Buovjaga 2024-10-01 16:05:42 UTC
(In reply to John Rethorst from comment #10)
> Created attachment 196825 [details]
> About box for Libreoffice 24.8.2.1 Mac Intel

Ok, that's a screenshot, but next time you can use the copy button you see to the right of "Version information" to get pure text.
Comment 12 John Rethorst 2024-10-01 16:25:18 UTC
Sorry! 

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 4; OS: macOS 14.7; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 13 Patrick (volunteer) 2024-10-01 17:27:39 UTC
(In reply to John Rethorst from comment #12)
> Version: 24.8.2.1 (X86_64) / LibreOffice Community
> Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
> CPU threads: 4; OS: macOS 14.7; UI render: Skia/Raster; VCL: osx
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

So you are running macOS Sonoma on an Intel Mac and I am running macOS Sequoia on a Silicon Mac. I don't have an Intel Mac, but I tested on macOS Sonoma and I still cannot reproduce this bug.

One question: when you paste, is the cursor (and a highlighted border) displayed in the Find or Replace input fields? I ask because the both the Find toolbar and the Find & Replace dialog do not lock focus (i.e. they aren't modal dialogs) so they only receive pasted content when they have focus (i.e. click the mouse inside a Find or Replace text field).
Comment 14 John Rethorst 2024-10-03 00:49:21 UTC
I originally reported the bug using version 7.6, having tried choosing Copy and Paste from the Edit menu, with focus on the Find and Find and Replace text boxes, and using keystrokes Command-C and Command-V, again with correct focus. Neither the menu choices nor keystrokes worked. 

Since then I’ve upgraded to 24.8, and found that menu selections now do work. Keystrokes still did not, but I remembered I have my keyboard set to Dvorak / Qwerty, which assigns the Dvorak keymap to all keys unless the Command key is also pressed, in which case the keymap stays at Qwerty. I quit Libreoffice, set keyboard to US standard and restarted. Now keystrokes as well as menu selections work. 

No other of the many applications I use presents this issue of incomplete key reassignment with the Command key pressed. They all work as expected with Command-C and Command-V. I would not call Libreoffice’s slightly non-standard behavior a bug, but someone might want to look at it, given increasing popularity of the Dvorak keymap. Meanwhile, thank you for your time and a great program.
Comment 15 Patrick (volunteer) 2024-10-03 01:49:32 UTC
(In reply to John Rethorst from comment #14)
> Since then I’ve upgraded to 24.8, and found that menu selections now do
> work. Keystrokes still did not, but I remembered I have my keyboard set to
> Dvorak / Qwerty, which assigns the Dvorak keymap to all keys unless the
> Command key is also pressed, in which case the keymap stays at Qwerty. I
> quit Libreoffice, set keyboard to US standard and restarted. Now keystrokes
> as well as menu selections work. 

Interesting that pasting fails with the Dvorak input manager. That's a very good piece of data. I hadn't tested with that input manager. I had only tested Russian and Japanese - Hiragana and Romaji keyboards when I last looked at this.

I'll take a look at it when I have some time. But AFAICT I am the only volunteer working on macOS bugs so I am a bit overwhelmed by the recent batch of macOS Sequoia bugs that are being filed. Every year it seems Apple changes something and something breaks on macOS. :/
Comment 16 Patrick (volunteer) 2024-10-03 01:55:14 UTC
Reopening as I can reproduce this with the Dvorak / QWERTY keyboard.
Comment 17 Patrick (volunteer) 2024-10-04 00:02:55 UTC
So I found the cause of this bug with the Dvorak - QWERTY keyboard and have uploaded the following patch:

https://gerrit.libreoffice.org/c/core/+/174462

There are still 2 more Dvorak - QWERTY keyboard bugs that need to be fixed:

1. Eliminate Command-V pasting twice in the Find & Replace dialog
2. Fix Command-C failure in Find toolbar
Comment 18 John Rethorst 2024-10-05 15:23:43 UTC
Cool — thank you!
Comment 19 Commit Notification 2024-10-08 18:31:43 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9240debe362a382389e7601073523162ea0cd80d

tdf#162843 replace the event's string parameters

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 20 Patrick (volunteer) 2024-10-08 18:39:55 UTC
I have committed a fix for this bug. The fix should be in tomorrow's (09 October 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 21 Commit Notification 2024-10-14 04:05:14 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

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

tdf#162843 replace the event's string parameters

It will be available in 24.8.3.

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.