Das kann leicht mit einem Event-Listener (od. observer in jQuery genannt) für das "input" JavaScript event umgangen werden.
Version: unspecified
Severity: normal
Whiteboard: storypoints: 3
Rillke | |
Sep 10 2012, 2:35 PM |
F9600: WikidataRepoUIBug_Input_cant_save.png | |
Nov 22 2014, 12:45 AM |
Das kann leicht mit einem Event-Listener (od. observer in jQuery genannt) für das "input" JavaScript event umgangen werden.
Version: unspecified
Severity: normal
Whiteboard: storypoints: 3
Zur Klarstellung: Copy & Paste mit der Maus/dem Kontextmenü (nicht drag & drop, da geht es) und nicht mit Strg+V
[ 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. ]
(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
Created attachment 11107
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.
Attached:
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.
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.").