Last modified: 2014-07-14 13:47:06 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 T69393, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67393 - [Monolingual] Old value is saved when keys are pressed to fast
[Monolingual] Old value is saved when keys are pressed to fast
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=frontend p=5 s=2014-07-01
:
Depends on: 64290
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-01 22:06 UTC by Thiemo Mättig
Modified: 2014-07-14 13:47 UTC (History)
3 users (show)

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


Attachments

Description Thiemo Mättig 2014-07-01 22:06:14 UTC
Steps to reproduce:

1. Edit an existing monolingual value. Lets say it contains the string "Test".
2. Press x + backspace very fast.
3. Save.

Result: The input field shows "Test" but "Testx" is saved.

Same happens the other way around. Press backspace + the character you just deleted very fast. "Tes" is saved.
Comment 1 Adrian Lang 2014-07-02 13:48:58 UTC
This is a race condition in ValueView. It has nothing to do with mono and can be verified with e. g. string values, too. ValueView::_updateValue is not correctly called under the following condition:

* Raw value of the expert is A
* You change the raw value to B
* ValueView is notified about the change
* ValueView calls _updateValue
* _updateValue calls _parseValue
* Before _parseValue finishes, you change the raw value back to A
* ValueView is notified about the change
* ValueView compares the current raw value to the stored raw value **which is still A**
* ValueView thinks nothing changed
* The _parseValue call for B finishes
* ValueView sets its stored value to the parsing result for B

I'll push a fix right now.
Comment 2 Adrian Lang 2014-07-02 13:50:31 UTC
https://github.com/wmde/ValueView/pull/80

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


Navigation
Links