Last modified: 2012-12-13 11:20:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42131, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40131 - Save button stays disabled when copy/paste into the "enter label" field instead typing in it
Save button stays disabled when copy/paste into the "enter label" field inste...
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Wikidata bugs
storypoints: 3
: javascript
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 14:35 UTC by Rainer Rillke @commons.wikimedia
Modified: 2012-12-13 11:20 UTC (History)
3 users (show)

See Also:
Web browser: Firefox
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Step by step. How one could copy and paste. (20.93 KB, image/png)
2012-09-13 10:30 UTC, Rainer Rillke @commons.wikimedia
Details

Description Rainer Rillke @commons.wikimedia 2012-09-10 14:35:49 UTC
Das kann leicht mit einem Event-Listener (od. observer in jQuery genannt) für das "input" JavaScript event umgangen werden.
Comment 1 Rainer Rillke @commons.wikimedia 2012-09-10 14:38:10 UTC
Zur Klarstellung: Copy & Paste mit der Maus/dem Kontextmenü (nicht drag & drop, da geht es) und nicht mit Strg+V
Comment 2 Dereckson 2012-09-10 16:05:46 UTC
[ Original title ]

Wenn bei der Eingabe der Bezeichnung eines "Datensatzes" Copy & Paste verwendet wird, bleibt der Speichern Knopf ausgegraut

[ Description translation ]

An event listener (or, following jQuery terminology, an observer) for this input field could easily fail to catch the relevant text change.

[ Comment #1 translation ]

Clarification: to reproduce this bug, you have to copy/paste with the mouse (context menu > paste) and not with CTRL + V (this fires the event). Drag n drop doesn't work anymore to reproduce this bug.

[ Adding "javascript" keyword, this should be fixed in JS using onChange property. ]
Comment 3 Rainer Rillke @commons.wikimedia 2012-09-10 16:37:56 UTC
(In reply to comment #2)
> An event listener (or, following jQuery terminology, an observer) for this
> input field could easily fail to catch the relevant text change.

Thanks for your translation efforts, I really appreciate this but this is unfortunately going into the wrong direction:

You simply can add an event observer for the *"input" javaScript event* (There is an event with the name "input" and according to the W3C it should fire when the contents of a an input e.g. of type "text" has changed, no matter how it was changed. It must not neccessarily fire immediately/ on each key stroke (to e.g. save resources).

http://dev.w3.org/html5/spec/common-input-element-apis.html#event-input-input

https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/input
Comment 4 denny vrandecic 2012-09-13 10:06:50 UTC
We could not reproduce the error. On which browser did this happen?
Comment 5 Rainer Rillke @commons.wikimedia 2012-09-13 10:30:00 UTC
Created attachment 11107 [details]
Step by step. How one could copy and paste.

(In reply to comment #4)
FF 15.0.1. I will upload a step-by-step screenshot. I'd say you didn't try hard but assume testers are stupid.
Comment 6 Rainer Rillke @commons.wikimedia 2012-09-13 10:31:36 UTC
Reopened since still the same problem.
Comment 7 denny vrandecic 2012-09-13 11:04:20 UTC
No, did not assume that the problem is with the user. Just wanted to know the browser. The exact workflow worked for me when testing, but I did not test on Firefox.

Confirming bug on Firefox.
Comment 8 denny vrandecic 2012-09-13 20:39:18 UTC
'input' event does not exist on IE <=8. There are some workarounds floating around.
Comment 9 Rainer Rillke @commons.wikimedia 2012-09-14 07:49:09 UTC
In older browsers you could do it like you did it before (.bind('keyup change mousedown mouseup paste -and-the-like-')) in newer browsers "input" event covers all your needs.

http://danielfriesen.name/blog/2010/02/16/html5-browser-maze-oninput-support/

Of course I would support if we would have a module in MW-core that would do what do what https://github.com/nottrobin/jQuery-html5fixes-plugin/blob/master/jquery.html5fixes.js is aimed to do (not testet, see section "// Create "input" event for browsers that don't support it.").
Comment 10 denny vrandecic 2012-09-20 07:38:39 UTC
It is fixed now in git, and will be deployed soon on the test environment.
Comment 11 Anja Jentzsch 2012-11-29 12:40:54 UTC
Verified in Wikidata demo time for sprint 16

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links