Bug 75229 - object:state-changed:focused events missing from multiline text widgets
Summary: object:state-changed:focused events missing from multiline text widgets
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2014-02-19 22:07 UTC by Joanmarie Diggs
Modified: 2014-03-04 13:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
accessible-event listener: focus.py (260 bytes, text/plain)
2014-02-19 22:07 UTC, Joanmarie Diggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2014-02-19 22:07:51 UTC
Created attachment 94388 [details]
accessible-event listener: focus.py

Steps to reproduce (using LibreOffice master - 2237604b6)

1. Create a Writer document with spelling errors
2. Load the attached accessible-event listener in a terminal
3. Press F7 to start spell checking
4. Press Tab to move amongst the widgets in the dialog

Expected results: An object:state-changed:focused event would be seen for the multiline text widget labeled "Not in Dictionary."

Actual results: The event never occurs for the text widget labeled "Not in Dictionary." In addition, there is no object:state-changed:focused event at all when that widget first gains focus. If you Tab once past that widget and then Shift+Tab once to re-focus it, the parent widget (of ROLE_PANEL) emits the signal.

Sample output from performing the above steps:

$ ./focus.py 

object:state-changed:focused(1, 0, 0)
	source: [push button | Correct]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [push button | Correct All]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [push button | Always correct]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [push button | Help]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [push button | Options]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [push button | Close]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [combo box | Text language]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [combo box | Text language]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [text | Text language]
	host_application: [application | soffice]
object:state-changed:focused(1, 0, 0)
	source: [list | Text language]
	host_application: [application | soffice]

[Here Tab was pressed twice to move from the combo box above to the Not in Dictionary text widget. No event was seen. The second press moved focus to the Ignore Once button:]

object:state-changed:focused(1, 0, 0)
	source: [push button | Ignore Once]
	host_application: [application | soffice]

[Here Shift+Tab was pressed once to move back to the Not in Dictionary text widget.]

object:state-changed:focused(1, 0, 0)
	source: [panel | ]
	host_application: [application | soffice]
Comment 1 Joanmarie Diggs 2014-02-19 22:20:51 UTC
(In reply to comment #0)

> [Here Tab was pressed twice to move from the combo box above to the Not in
> Dictionary text widget. No event was seen. The second press moved focus to
> the Ignore Once button:]

s/twice to move/twice. The first press moved/

Sorry for the noise.
Comment 2 Caolán McNamara 2014-03-04 11:51:15 UTC
This appears to be a regression from b755fb8c0f6b1282f62c12f378c0a5ecac64d490 where TextWindow::GetFocus lost its call to its superclass GetFocus which eventually put the focus in the right place.
Comment 3 Commit Notification 2014-03-04 11:57:06 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#75229 missing object:state-changed:focused



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.