Last modified: 2014-11-13 13:16:47 UTC
1) Visit a random page on ja.wiki 2) Reach action=edit 3) Press tab or otherwise move the cursor in edit summary text area 4) Press enter I. Expected: the edit is saved. II. Observed: nothing happens and I have to click the button.
If I recall it correctly, this is a behavior added by [[:ja:MediaWiki:Common.js]], not MediaWiki. It can be toggled with the variable summaryEnterRejectDisable. I believe the reason behind this behavior was to prevent unintended saving, which happens rather frequently due to the use of IME.
Closing as INVALID as per comment 1
(In reply to Yusuke Matsubara from comment #1) > I believe the reason behind this behavior was to prevent unintended saving, > which happens rather frequently due to the use of IME. What IME? Sounds like a bug. :)
(In reply to Nemo from comment #3) > (In reply to Yusuke Matsubara from comment #1) > > I believe the reason behind this behavior was to prevent unintended saving, > > which happens rather frequently due to the use of IME. > > What IME? Sounds like a bug. :) [[Input method]]. Inputting Japanese language typically involves frequent uses of the enter key in the midst of a sentence. This sometimes causes unintentinal saving without the JS hack to prevent it. It might be possible for MediaWiki to observe the IME on/off and add some mechanism for IME-friendliness, but that might be another bug to report.
If anybody wants to turn this into an IME bug, please adjust the summary and component. I still consider the current summary INVALID as it's on-wiki code
(In reply to Yusuke Matsubara from comment #4) > [[Input method]]. Inputting Japanese language typically involves frequent > uses of the enter key in the midst of a sentence. This sometimes causes > unintentinal saving without the JS hack to prevent it. Are such schemes (e.g. the use of enter) documented somewhere? > > It might be possible for MediaWiki to observe the IME on/off and add some > mechanism for IME-friendliness, but that might be another bug to report. This bug was filed from the perspective of a non-ja user, so it makes sense to just adapt the summary.
You can probably read all about IMEs on Wikipedia. It has been explained that this is an on-wiki issue, and how to disable this behavior for yourself.
There's the hint of a bad code smell here... if wiki communities need to implement custom JavaScript hacks to achieve reasonable/expected behavior, something feels awry.
(In reply to Nemo from comment #6) > (In reply to Yusuke Matsubara from comment #4) > > [[Input method]]. Inputting Japanese language typically involves frequent > > uses of the enter key in the midst of a sentence. This sometimes causes > > unintentinal saving without the JS hack to prevent it. > > Are such schemes (e.g. the use of enter) documented somewhere? I don't know of a document specifically explaining this nor what a more general and cleaner solution than the hack look like, but I'll try explaining the problem as I see it. A typical IME window looks like a combo box [1] which appears after you enter some pre-conversion text and press the conversion key (which is typically the space bar). In the window, you will select a candidate by going up and down with the arrow keys and decide on by pushing Enter. For example, in order to input 誤字を修正しました [2] you may type "gojiwoshuuseishimashita<space><enter>" (for simplicity, I assume the system always suggests the correct conversion result at the top candidate). You may alternatively type "goji<space><enter>wo<enter>shuusei<space><enter>shimashita<enter>". Some people prefer the latter, partly because longer fragments (as in the former) sometimes result in a screwed up conversion due to the greater ambiguity in word segmentation. It's not rare for a user to hit Enter twice accidentally while trying to finalize a piece of conversion, and it results in an unintentional saving if you are on a text box. A possible solution I can think of is to detect an IME on/off event [2] and add a confirmation prompt to ask "do you really want to save this?" upon an Enter event. (I'm not too about the feasibility.) [1] https://dvcs.w3.org/hg/ime-api/raw-file/default/Overview.html#candidate-window [2] Goji wo shusei shimashita / "I have fixed a typo" [3] http://stackoverflow.com/questions/7297124/detect-if-using-ime-for-input-in-browser