Closed
Bug 922478
Opened 11 years ago
Closed 7 years ago
[Keyboard] Have a way to disable / enable soft keyboards
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: janjongboom, Unassigned)
References
Details
Attachments
(1 file)
5.72 KB,
patch
|
xyuan
:
review+
|
Details | Diff | Splinter Review |
Feature request from apc.io at https://github.com/apc-io/apc-firefox-os/issues/8
They would like to have a way to disable the soft keyboard (other than via a pref). I guess the nice way would to add an API to navigator.mozInputMethod.mgmt in Gecko to handle this. Should not be very hard.
:yxl, what do you think?
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(xyuan)
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → janjongboom
Comment 1•11 years ago
|
||
It is reasonable way to add an API for that. But we need Rudy to confirm the requirement before implementation.
Flags: needinfo?(xyuan) → needinfo?(rlu)
Reporter | ||
Comment 2•11 years ago
|
||
I think Rudy is traveling from Canada or something. Anyway, I was in a plane for two hours and didn't have anything to do, so here's the gecko part.
Attachment #815384 -
Flags: review?(xyuan)
Reporter | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Comment on attachment 815384 [details] [diff] [review]
Gecko part
Review of attachment 815384 [details] [diff] [review]:
-----------------------------------------------------------------
r=me. The code looks good to me.
::: dom/inputmethod/MozKeyboard.js
@@ +243,5 @@
>
> MozInputMethodManager.prototype = {
> _supportsSwitching: false,
> _window: null,
> + _softKeyboardEnabled: true,
I prefer to using `false` as default value.
@@ +289,5 @@
> + },
> +
> + get softKeyboardEnabled() {
> + if (!WindowMap.isActive(this._window)) {
> + return true;
The same. When keyboard is not active, return false.
::: dom/webidl/InputMethod.webidl
@@ +57,5 @@
> void hide();
> +
> + // Tell the OS to enable/disable the soft keyboard
> + // f.e. when a hardware keyboard is attached.
> + attribute boolean softKeyboardEnabled;
Can we use the name `enabled` without prefix as that of the `hide()` method? Is the prefix `softKeyboard` necessary?
Attachment #815384 -
Flags: review?(xyuan) → review+
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Yuan Xulei [:yxl] from comment #4)
> I prefer to using `false` as default value.
I don't really agree, the default should be that soft keyboard would pop up as it's the desired behavior for 99,999% of all devices running FxOS at the moment.
> Can we use the name `enabled` without prefix as that of the `hide()` method?
> Is the prefix `softKeyboard` necessary?
Could be, but it misses context. `mgmt.enabled = false` would give me the impression that you can disable the `mgmt` module or something. Let me know if you agree/disagree.
Comment 6•11 years ago
|
||
Sorry for late reply.
Yes, we need an API to know if there is an hardware keyboard present for the device.
Does the current implementation conform to what Tim proposed in,
https://wiki.mozilla.org/User:Timdream/InputMethod_API_with_hardware_keyboard
If not, can we counter propose there?
Thanks.
Flags: needinfo?(rlu)
Reporter | ||
Comment 7•11 years ago
|
||
I added comments in the API proposal. We're trying to reach the same path as in the proposal, so let's finish that discussion first before continuing here.
Updated•11 years ago
|
Blocks: imapi-hw-keyboard
Reporter | ||
Updated•10 years ago
|
Assignee: janjongboom → nobody
Comment 8•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•