Closed
Bug 908175
Opened 11 years ago
Closed 11 years ago
[InputContext] Clearing inputcontext sets values to string "null" instead of NULL
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(blocking-b2g:koi+, b2g-v1.2 fixed)
People
(Reporter: janjongboom, Assigned: janjongboom)
References
Details
(Whiteboard: QARegressExclude)
Attachments
(1 file)
2.08 KB,
patch
|
kanru
:
review+
khuey
:
review+
|
Details | Diff | Splinter Review |
If we invalidate the inputcontext in b2g then all DOMString values are set to "null" because in the webidl the types are specified as DOMString instead of DOMString?
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → janjongboom
Attachment #793987 -
Flags: review?(kchen)
Updated•11 years ago
|
Attachment #793987 -
Flags: review?(khuey)
Attachment #793987 -
Flags: review?(kchen)
Attachment #793987 -
Flags: review+
Attachment #793987 -
Flags: review?(khuey) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 2•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/8a35072c7cb8
Keywords: checkin-needed
Comment 3•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8a35072c7cb8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 4•11 years ago
|
||
These attributes should be empty string other than null, when the inputcontext is invalid. You shouldn't change the API interface.
Status: RESOLVED → REOPENED
Flags: needinfo?(janjongboom)
Resolution: FIXED → ---
Comment 5•11 years ago
|
||
Hmm, I didn't know the API requires the invalidated inputcontext to return empty string other than null. This should be added to the API document.
Comment 6•11 years ago
|
||
The API doesn't specify what the invalid inputcontext should return. The only requirement is that IME can't interact with the focused input field via invalid inputcontext. It isn't necessary to set these attributes to null or empty string, but is a nice to have feature that will prevent IME using invalid inputcontext by mistake. So I think we should not change the API as it is not necessary.
Assignee | ||
Comment 7•11 years ago
|
||
I don't agree. Empty string is something fundamentally different than NULL. F.e. code that relies on textBeforeCursor won't know whether the context was invalidated because `textBeforeCursor == ''`. It could be that there is no text. NULL is clear, as it's not a valid value for any of the fields.
Flags: needinfo?(janjongboom)
Comment 8•11 years ago
|
||
IME should not rely on checking the attributes of an inputcontext to know if the inputcontext is valid. It should listen to oninputcontextchange event and check mozInputMethod.inputcontext to ensure the inputcontext is valid and keep a valid reference. Setting the attributes to null is merely a safeguard to prevent error. So I insist on not changing the API.
Assignee | ||
Comment 9•11 years ago
|
||
Then why even clear it at all? If we clear it, it should be to an invalid value.
Comment 10•11 years ago
|
||
It's fine for me not to clear these attribute if calling any method of an invalid inputcontext will return failure.
Updated•11 years ago
|
Status: REOPENED → RESOLVED
blocking-b2g: --- → koi?
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
blocking-b2g: koi? → koi+
status-b2g-v1.2:
--- → fixed
Updated•11 years ago
|
Whiteboard: QARegressExclude
You need to log in
before you can comment on or make changes to this bug.
Description
•