Bug 45962 - "context menu" key with cursor in header/footer makes the cursor jump to document body
Summary: "context menu" key with cursor in header/footer makes the cursor jump to docu...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: Other Linux (All)
: medium normal
Assignee: Cédric Bosdonnat
URL:
Whiteboard: target:3.6.0 target:3.5.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-02-12 12:54 UTC by Cor Nouws
Modified: 2012-04-04 06: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 Cor Nouws 2012-02-12 12:54:02 UTC
- writer file with header
- cursor in header
- use 'properties'key (e.g: for 'Edit paragraph style')
  > cursor leaves the header/footer, 
    goes to the last paragraph in the page 
    and shows the context menu there
Comment 1 Björn Michaelsen 2012-03-09 01:30:59 UTC
Cant reproduce this on 3.5.0-2ubuntu1 vendor build or -3-5 branchoff (85c6244b85b29c1d2bb9d89b62e9512dd65378b5) -- no inappropriate cursor movement.

What do you mean with 'use properties key' mean? I take it as right click for context menu.
Comment 2 Cor Nouws 2012-03-09 05:13:38 UTC
(In reply to comment #1)
> Cant reproduce this on 3.5.0-2ubuntu1 vendor build or -3-5 branchoff
> (85c6244b85b29c1d2bb9d89b62e9512dd65378b5) -- no inappropriate cursor movement.

351rc1 still shows the bug.

> What do you mean with 'use properties key' mean? I take it as right click for
> context menu.

Right from my space bar, there is first AltGr, then the properties key, then Ctrl and so on. The icon on the key shows a drop down list.
Comment 3 Michael Stahl (CIB) 2012-03-09 11:21:46 UTC
this is a regression from a6176612ff1a6a142a68964b2c0834d28125fc45.

apparently the problem is that when pressing the "context menu"
key VCL generates a COMMAND_CONTEXTMENU command,
with a cursor position that is centered on the entire window,
hence likely to be in the document body.

the lcl_CheckHeaderFooterClick function, called from
SwEditWin::Command, then sets the document's cursor to the
synthetic mouse cursor position.
Comment 4 Michael Stahl (CIB) 2012-03-09 11:39:30 UTC
so i've found that the event has a flag if it's an actual mouse event,
seems checking for that fixes it
Comment 5 Not Assigned 2012-03-09 11:43:48 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=87279e0e812bac7f2c17f2758a39bcfd942214af

fdo#45962: fix context menu key yanking cursor out of header/footer
Comment 6 Not Assigned 2012-03-12 01:12:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e73ae4363b55dd544184be1c938f7103f0e64ee3&g=libreoffice-3-5

fdo#45962: fix context menu key yanking cursor out of header/footer


It will be available in LibreOffice 3.5.2.
Comment 7 Cor Nouws 2012-04-04 06:59:04 UTC
Ah, great - works fine again - thanks