Bug 1382982

Summary: gnome: iBus typing language detector breaks event call stack of JavaScript
Product: [Fedora] Fedora Reporter: danielemi
Component: firefoxAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 28CC: 0xalen+redhat, alexl, danielemi, gecko-bugs-nobody, i18n-bugs, jhorak, john.j5live, pjasicek, rhughes, rstrode, sandmann, shawn.p.huang, smaitra, tfujiwar
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-28 23:05:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
html page for test purpose
none
test-html3.html none

Description danielemi 2016-10-08 21:35:26 UTC
Created attachment 1208438 [details]
html page for test purpose

Description of problem:
My Fedora box is configured with two typing language between which I can switch, English and Chinese.
I'm using Firefox v49 as browser.
I'm developing a webpage, a registration form using jQuery on the validation part.
The registration form contain 4 input controls with 2 password controls, all validated on the blur event. The form script is kind of complex one using blur, and focus events and a list of functions.
The form script completely mess up on the live validation of the fields due to the presence of the two password controls on which only latin alphabet is allowed. The ibus language detector change on the fly when the two password fields received focus causing blur and focus events of different contols to happen in unexpected order. It is like ibus is taking the focus and releasing.
I tested both jQuery (all the available methods) and pure javascript with the same result.
I had the chance to try other websites using blur and focus events on password fields and are completely mess up too.
To finish my job I will unset the Chinese IME. 
I can't guess what is about application development in the same context.

Version-Release number of selected component (if applicable):
Fedora 24 4.7.5-200.fc24.x86_64
ibus-1.5.13-3.fc24.x86_64

How reproducible:
https://jsfiddle.net/8tqwL7y5

Steps to Reproduce:
1. Settings, Region and Lanaguges, input sources: set English (US) and Chinese (intelligent Pinyin) 
2. try the link 
3. try the webpage attached

Actual results:
Blur event doesn't happen or happen just mixed up with other events like other control's Focus events.

Expected results:
Blur and Focus events get fired in common order on the events call stack

Comment 1 fujiwara 2016-10-14 09:57:54 UTC
I tried that page with "Chinese (intelligent Pinyin)".
When the focus is out, every input box launches the alert dialog.

I think I don't see your problems.

Comment 2 danielemi 2016-10-14 11:13:04 UTC
No, on the password fields their respective blur events are fired when they received the focus. 

You should set English and Chinese languages together.

Read the alerts carefully (if helps comment out the javascript for the focus events). 

The problem happens both if you have selected the English or the Chinese IME.

I'm sorry you can't catch it.

Comment 3 danielemi 2016-10-14 11:32:25 UTC
Please note that I'm inside a Virtualbox VM. 
My Fedora 24 is the guest OS.

Who knows that this makes any difference..

Comment 4 fujiwara 2016-10-17 02:56:54 UTC
(In reply to danielemi from comment #2)
> You should set English and Chinese languages together.

I did it.


> Read the alerts carefully (if helps comment out the javascript for the focus
> events). 

I think I read your problem while I don't catch your description completely.

I don't think your problem can happen in every desktop.
Describe which desktop you tried.

(In reply to danielemi from comment #3)
> Please note that I'm inside a Virtualbox VM. 
> My Fedora 24 is the guest OS.

Me too.

Comment 5 danielemi 2016-10-20 10:53:22 UTC
>I think I read your problem while I don't catch your description completely.

The problem is simple: on the password fields their respective blur events are fired when they received the focus.

In theory, this means that any login form of any website that do client-side validation on the blur events get broken (it appears a good trick to contain the chinese people from using Linux to surf Internet)

>I don't think your problem can happen in every desktop.
>Describe which desktop you tried.

If I unset the Chinese IME, the problem disappears. So, it seems difficult the problem is related to the host OS.

However, to answer, I'm using Windows7 SP1 64 with KVM acceleration enabled.

Comment 6 fujiwara 2016-10-21 02:05:01 UTC
> However, to answer, I'm using Windows7 SP1 64 with KVM acceleration enabled.

No, I don't ask Windows and we don't support IBus on Windows too.
I'm asking you which desktop is used in Fedora 24 on VM box.

I verified XFDE is no problem.

Comment 7 danielemi 2016-10-21 08:38:57 UTC
> I verified XFDE is no problem.

I'm using gnome 3.20.4

Comment 8 fujiwara 2017-01-11 04:34:40 UTC
GNOE relative issue.

Comment 9 fujiwara 2017-01-11 04:35:15 UTC
GNOME relative issue.

Comment 10 Fedora End Of Life 2017-07-25 23:24:14 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 11 fujiwara 2017-07-26 03:27:31 UTC
I'm still a bit busy to investigate the JavaScript issue.

Comment 12 Jan Kurik 2017-08-15 07:27:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 13 fujiwara 2018-07-05 07:55:54 UTC
I think this is not relative with ibus.
Even if I delete "Chinese (intelligent Pinyin)", I can reproduce this problem in both GNOME Wayland and GNOME Xorg.

Comment 14 fujiwara 2018-07-05 08:05:16 UTC
Created attachment 1456691 [details]
test-html3.html

Now I can reproduce this problem in XFCE desktop too in Fedora 28.

Comment 15 fujiwara 2018-07-05 08:06:48 UTC
I tried attached test-html3.html

@danielemi
Probably I think this issue is caused by jquery or firefox?

Comment 16 fujiwara 2018-07-19 03:07:55 UTC
Forwarding to firefox since this can be reproduced without ibus.

Comment 17 Ben Cotton 2019-05-02 20:31:22 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 18 Ben Cotton 2019-05-28 23:05:26 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 19 Red Hat Bugzilla 2023-09-14 03:32:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days