Closed
Bug 661417
Opened 15 years ago
Closed 15 years ago
Pressing Enter to commit a selection in the Japanese IME causes form to auto-submit
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: hosang, Unassigned)
References
()
Details
(Keywords: inputmethod)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
While typing in the comments section of stack exchange in Japanese, if you press enter to commit to a specific kanji selection, the comment will auto submit and post to the site.
Reproducible: Always
Steps to Reproduce:
1.click add comment
2.type enough to fill the min. requirement for text
3. then type "kanji" in japanese ime, and press enter to commit to a kanji choice.
4.
Actual Results:
Comment gets submitted
Expected Results:
Can continue typing
discussion on stackexchange meta
http://meta.japanese.stackexchange.com/questions/37/please-disable-enter-to-submit-comments
Bug has been confirmed by Stackexchange moderators that this is a bug with firefox as the site performs fine in chrome.
| Reporter | ||
Comment 1•15 years ago
|
||
The japanese site is current in private beta, but you can test on stackoverflow as the problem occurs there as well.
Comment 2•15 years ago
|
||
Hmm, not sure if IME stuff should be in Core :: DOM Events or Editor. Let's try Editor, because ehsan's a nice guy. :)
Component: General → Editor
Product: Firefox → Core
QA Contact: general → editor
Comment 3•15 years ago
|
||
This should be widget bug if this were really our bug. I guess that the website handles some events which might be different from other browsers.
Mark: Can you attach a simple test case? I cannot login the site. And what IME are you using? Can you reproduce the bug without javascript?
Component: Editor → Widget: Win32
QA Contact: editor → win32
Updated•15 years ago
|
Keywords: inputmethod
The problem lies in the fact that Stackoverflow/Stackexchange attaches a Javascript handler to the textarea that submits the form when Enter is pressed. This is non-standard behavior (just to make that clear).
The Enter when selecting a kanji in the IME should not be passed on and trigger a Javascript event.
| Reporter | ||
Comment 5•15 years ago
|
||
I'm using the japanese IME in windows 7 64-bit. The bug also appears on the normal stackexchange site http://stackoverflow.com/
Comment 6•15 years ago
|
||
(In reply to comment #5)
> I'm using the japanese IME in windows 7 64-bit. The bug also appears on the
> normal stackexchange site http://stackoverflow.com/
I'm not sure where you pointed... I cannot find "add comment" which is written in comment 0. And I cannot reproduce this bug with MS-IME on Win7 in the editor for search (top-left of the URL).
Comment 7•15 years ago
|
||
> data:text/html,<input id="i"><p id="p"></p><script>function keyname(event) { for (var s in event) { if (s.match(/^DOM_VK_/) && event[s] == event.keyCode) { return s; } } return "0x" + event.keyCode.toString(16); } function log(event) { var p = document.getElementById("p"); p.innerHTML = event.type + " keyCode=" + keyname(event) + ", charCode=" + event.charCode + " (0x" + event.charCode.toString(16) + "), shift=" + event.shiftKey + ",ctrl=" + event.ctrlKey + ", alt=" + event.altKey + ", meta=" + event.metaKey + "<BR>" + p.innerHTML; } function log2(event) { var p = document.getElementById("p"); p.innerHTML = event.type + "<BR>" + p.innerHTML; } var i = document.getElementById('i'); i.addEventListener("keydown", log, false); i.addEventListener("keypress", log, false); i.addEventListener("keyup", log, false); i.addEventListener("compositionstart", log2, false); i.addEventListener("compositionend", log2, false); i.addEventListener("text", log2, false);</script>
Load above URL and type something in the <input>. Probably, you can see only keyup event for Enter key at committing composition string. It's not invalid behavior for DOM3 Events (draft). If the website submits the form at the keyup event, this bug is INVALID.
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#keys-IME
For reference, a comment box that shows this behavior should be on this page: http://meta.stackoverflow.com/questions/63644 (you may need to login/register first).
| Reporter | ||
Comment 9•15 years ago
|
||
Was occuring in the 4.x branch of Firefox, as well as 5.0b
Version: unspecified → 5 Branch
| Reporter | ||
Comment 10•15 years ago
|
||
This has been fixed on the offending site it seems so i'm going to mark this as resolved.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•