Closed
Bug 583293
Opened 16 years ago
Closed 16 years ago
Add some timer based workaroundto VKB popup for strange websites
Categories
(Core Graveyard :: Widget: Qt, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: steffen.imhof, Assigned: steffen.imhof)
References
Details
Attachments
(1 file, 1 obsolete file)
|
6.05 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
There are websites (like gmail.com) that focus some editable object for a short while when switching page content.
This leads to the somewhat undesirable result, that the VKB pops up shortly and immediately is closed again. While this is working as designed it is still annoying.
The attached patch tries to work around this by not immediately opening the VKB but instead starting a timer and canceling the popup if the VKB is closed again in the meantime.
Currently the timer value is 300ms, but can be changed by setting the environment variable MOZ_QT_VKBTIMEOUT.
Attachment #461589 -
Flags: review?(doug.turner)
Comment 1•16 years ago
|
||
Comment on attachment 461589 [details] [diff] [review]
Patch to popup the VKB with a small delay to prevent too fast switches
Change review on behalf of doug
Attachment #461589 -
Flags: review?(doug.turner) → review?(romaxa)
Comment 2•16 years ago
|
||
Comment on attachment 461589 [details] [diff] [review]
Patch to popup the VKB with a small delay to prevent too fast switches
>+static bool gPendingVKBOpen = false;
please add a comment.
>+ requestVKB(0); //means the application requested the VKB during but
>+ //did not manage to open it because there was no focused window yet
C style comments please. 80 col too, ftw.
>+ QTimer::singleShot( aTimeout, this, SLOT(showVKB()));
no space between ( and aTimeout.
>+ int timevalue = 300;
>+ const char* timeout = getenv("MOZ_QT_VKBTIMEOUT");
>+ if (timeout) {
>+ timevalue = atoi(timeout);
change the timeout to a mozilla preference. jim can help you with fixing up the android side of things (which also should use a preference)
Attachment #461589 -
Flags: review?(romaxa) → review-
| Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> >+ requestVKB(0); //means the application requested the VKB during but
> >+ //did not manage to open it because there was no focused window yet
>
> C style comments please. 80 col too, ftw.
The whole Qt port has C++ style comments inside the code, so I would like to keep it that way, just using its own line for it. And staying in the 80 col boundary of course.
> change the timeout to a mozilla preference. jim can help you with fixing up
> the android side of things (which also should use a preference)
Jim, do you already have a bug number for the Android stuff? Or a name of the preference? If not, how about "ui.vkb.open.delay"?
| Assignee | ||
Comment 4•16 years ago
|
||
I updated the patch to address the review comments and for now I used the name I proposed for the preference (should be easy to change if needed).
Attachment #461589 -
Attachment is obsolete: true
Attachment #462487 -
Flags: review?(doug.turner)
Comment 5•16 years ago
|
||
Comment on attachment 462487 [details] [diff] [review]
New version of the patch (review comments)
i'll fix the spelling error in the comment, and drop the NS_WARNING if the pref isn't set.
Updated•16 years ago
|
Attachment #462487 -
Flags: review?(doug.turner) → review+
| Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #5)
> Comment on attachment 462487 [details] [diff] [review]
> New version of the patch (review comments)
>
> i'll fix the spelling error in the comment, and drop the NS_WARNING if the pref
> isn't set.
Thanks.
Status: NEW → ASSIGNED
| Assignee | ||
Updated•16 years ago
|
Assignee: nobody → steffen.imhof
Comment 7•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•