GNOME Bugzilla – Bug 742573
remember password only works if file contains <form> but not when login filled in by JS
Last modified: 2018-01-10 16:58:17 UTC
Only when the html file contains form that function would works. But for www.baidu.com, when I clicked login button, the login form was filled in by javascript. In this kind of situation, the remember password function doesn't work. I am afraid we should get the signal when the send form action performed.
I think this should be fixed in 3.23, please complain if it's still a problem.
(In reply to Michael Catanzaro from comment #1) > I think this should be fixed in 3.23, please complain if it's still a > problem. It's still a problem. Details in https://bugs.webkit.org/show_bug.cgi?id=173915.
Created attachment 357687 [details] Test page This is Mikhaylenko's test page. I've hosted it at https://people.gnome.org/~mcatanzaro/ephy-form-test.html for a limited period of time.
Note this patch depends on a patch to WebKit.
Created attachment 357688 [details] [review] web-extension: Handle password forms submitted via JS Currently, Epiphany relies on the DOM submit event to detect if a form has been submitted. However, this fails if the form has been submitted via JavaScript, as the submit event is not emitted in this case. We can't detect this using DOM alone, so use the new WebKitWebPage signal that has been provided for this purpose.
With both this patch and webkit patch, I get: (WebKitWebProcess:15982): GLib-GObject-WARNING **: /home/jhbuild/jhbuild/checkout/glib/gobject/gsignal.c:2523: signal 'will-submit-form' is invalid for instance '0x3001c60' of type 'WebKitWebPage' (WebKitWebProcess:15989): GLib-GObject-WARNING **: /home/jhbuild/jhbuild/checkout/glib/gobject/gsignal.c:2523: signal 'will-submit-form' is invalid for instance '0x3a3c860' of type 'WebKitWebPage' (WebKitWebProcess:15991): GLib-GObject-WARNING **: /home/jhbuild/jhbuild/checkout/glib/gobject/gsignal.c:2523: signal 'will-submit-form' is invalid for instance '0x32a11a0' of type 'WebKitWebPage'
(In reply to Alexander Mikhaylenko from comment #6) > With both this patch and webkit patch, I get: This turned out to be weird jhbuild problems.
Created attachment 357846 [details] [review] web-extension: Handle password forms submitted via JS Currently, Epiphany relies on the DOM submit event to detect if a form has been submitted. However, this fails if the form has been submitted via JavaScript, as the submit event is not emitted in this case. We can't detect this using DOM alone, so use the new WebKitWebPage signal that has been provided for this purpose.
Hey Alexander, can you please post the latest version of your patches? I'm hoping to land the WebKit API that was needed soon and I notice the patches here look a little stale; I'm sure you had more recent code than this somewhere.
Created attachment 363004 [details] [review] web-extension: Handle forms submitted through JS
Created attachment 363005 [details] [review] web-extension: Save password in memory when handling form events This allows to remember the password even if a website clears the password field immediately after submitting.
Thanks!
It took longer than expected, but I've landed the new WebKit API in https://trac.webkit.org/changeset/226366/webkit. It's slightly modified from my original proposal.
Created attachment 366259 [details] [review] web-extension: Handle forms submitted through JS
Created attachment 366260 [details] [review] web-extension: Save password in memory when handling form events This allows to remember the password even if a website clears the password field immediately after submitting.
Created attachment 366261 [details] [review] Require WebKitGTK+ 2.19.4 For WebKitWebPage::will-submit-form and WebKitFormSubmissionStep
Attachment 366259 [details] pushed as df79db8 - web-extension: Handle forms submitted through JS Attachment 366260 [details] pushed as 392c199 - web-extension: Save password in memory when handling form events Attachment 366261 [details] pushed as a24651b - Require WebKitGTK+ 2.19.4