Closed
Bug 717600
Opened 12 years ago
Closed 7 years ago
Maxlength attribute is ignored for typed characters with the vkb (even when composition string is committed)
Categories
(Firefox for Android Graveyard :: Keyboards and IME, defect, P4)
Tracking
(fennec+)
RESOLVED
WORKSFORME
Tracking | Status | |
---|---|---|
fennec | + | --- |
People
(Reporter: martijn.martijn, Unassigned, Mentored)
References
()
Details
(Keywords: inputmethod)
Attachments
(1 file)
79.04 KB,
image/png
|
Details |
See first text input on http://miketaylr.com/pres/html5/forms2.html Steps to reproduce: - Tap on first text input, vkb comes up - Type more than 6 characters in the text input Expected result: - No more text should appear than the first 6 characters Actual result: - All the text shows up that has been typed, even after the 6th character With the context menu, the pasted text is cut off to 6 characters, so there it is not ignored.
Comment 1•12 years ago
|
||
I believe this is related to the editor. Though, we are going to make that behavior the normal behavior with bug 613016.
Depends on: 613016
Comment 2•12 years ago
|
||
This is not a bug. The composition string must not be cut off by maxlength attribute because Japanese IME needs to be able to convert longer unconverted text to shorter converted text. (bug 98434) nsEditor cuts off when the composition string is committed.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 3•12 years ago
|
||
Not happening on the LG Optimus Black. The committed composition string is longer than 6 characters here.
Reporter | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Isn't the *committed* string shrunk to the maxlength? If so, it's a bug, but I'm not sure why I cannot reproduce it on desktop Fx. nsEditor does handle the maxlength attribute.
Comment 6•12 years ago
|
||
Here is the implementation: http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/text/nsTextEditRules.cpp#606
Updated•12 years ago
|
Keywords: inputmethod
Comment 7•12 years ago
|
||
Okay, I confirmed it. The committed string isn't shrunk to the maxlength on Android.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: Maxlength attribute is ignored for typed characters with the vkb → Maxlength attribute is ignored for typed characters with the vkb (even when composition string is committed)
Comment 8•12 years ago
|
||
Hmm, that's strange, if typing without IME, maxlength does work fine.
Comment 9•12 years ago
|
||
So, IsIMEComposing() return true here, right? <http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/text/nsTextEditRules.cpp#1195> No wonder we don't truncate insertion then! I don't see the code responsible for doing the truncation when committing...
cc'ing Alexp. Maybe he might be able to get some input.
Comment 11•12 years ago
|
||
Committing string shouldn't have any information of clauses of composition string. When nsEditor receives such text event, nsEditor::mIsIMEComposing becomes false. http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/base/nsEditor.cpp#4379 http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/base/nsEditor.cpp#4349 http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/text/nsPlaintextEditor.cpp#978 nsWindow for Android might set some clause information for commit event. http://mxr.mozilla.org/mozilla-central/source/widget/android/nsWindow.cpp#1950
Comment 12•12 years ago
|
||
I'm not sure if I understand comment 11. What I was trying to say in comment 9 is that I think we should look at the maxlength property and truncate the insertion if needed when committing an IME transaction. Do you agree?
Updated•12 years ago
|
Assignee: nobody → alexp
tracking-fennec: --- → +
Priority: -- → P4
Updated•12 years ago
|
Assignee: alex.mozilla → cpeterson
Updated•12 years ago
|
Component: General → IME
Updated•11 years ago
|
Assignee: cpeterson → nobody
Status: REOPENED → NEW
Updated•10 years ago
|
Whiteboard: [mentor=jchen]
Assignee | ||
Updated•10 years ago
|
Mentor: nchen
Whiteboard: [mentor=jchen]
Comment 13•7 years ago
|
||
latest build seems cannot reproduce.
Status: NEW → RESOLVED
Closed: 12 years ago → 7 years ago
Resolution: --- → WORKSFORME
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•