Bug 513046 - [e4] Very first mouse click does not work as expected
Summary: [e4] Very first mouse click does not work as expected
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: Incubator (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-03 05:24 EST by ben CLA
Modified: 2017-04-11 08:26 EDT (History)
0 users

See Also:


Attachments
Snippet to reproduce this bug (11.79 KB, application/x-zip-compressed)
2017-04-10 09:04 EDT, ben CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ben CLA 2017-03-03 05:24:18 EST
The very first mouse click does not work as expected. Any selected control loses focus immediatly after clicked. Tested with Edge and Firefox 45.7.0. I did not test with none e4 application.
Comment 1 Ivan Furnadjiev CLA 2017-04-07 04:09:14 EDT
Could you provide a snippet to reproduce the issue? Is it reproducible with our e4 Demo?
Comment 2 ben CLA 2017-04-10 09:04:58 EDT
Created attachment 267725 [details]
Snippet to reproduce this bug

1. Click in the right part if not the active one
2. Click in the upper text field

Focus switches to the second text field cause of implementation of setFocus. This behaviour differs from SWT behavior. SWT first calls setFocus and than sets the focus to the text field.
Comment 3 ben CLA 2017-04-10 09:07:45 EDT
The bug is not reproducible with your e4 demo.
Comment 4 Ivan Furnadjiev CLA 2017-04-11 04:34:15 EDT
I still don't understand what is the expected (RCP) behavior here and how it's related to the "very first mouse click". When I focus the part, the focus is set to the lower text field. If I click on the second... the focus is moved there.
Comment 5 ben CLA 2017-04-11 08:26:52 EDT
Sorry, i mixed two things up here.
What i mean with "very first mouse click" can be best reproduced with the snippet from bug 514933. If you click into the text field for the very first time and nowhere else before, it immediately loses focus. The part does not contain a method annotated with @Focus.
comment #3 describes another unexpected behavior. In a RCP application, if you directly click into the upper text field without focusing the part prior to that, the text field will get focused no matter what a method annotated with @Focus tells. In a RAP application this is not the case.