Last modified: 2014-11-05 14:54:32 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 T56021, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54021 - jQuery.wikibase.***view widgets should not switch between edit modes on their own
jQuery.wikibase.***view widgets should not switch between edit modes on their...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=frontend p=0
: javascript
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-11 16:54 UTC by Daniel A. R. Werner
Modified: 2014-11-05 14:54 UTC (History)
4 users (show)

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


Attachments

Description Daniel A. R. Werner 2013-09-11 16:54:10 UTC
he jQuery.wikibase.***view widgets (.e.g "valueview") should not be interpreting the "enter" key or "esc" keys being pressed as the user's wish to leave the edit mode. This logic should be implemented in the code instantiating the widgets.

This current behavior can be a problem when the widgets should be used on their own, e.g. on a special page where they shall remain in edit mode all of the time. It seems like we designed the widgets too smart while this should better be left to the respective controller depending on the use-case.

Changing this and introducing some sort of "focus management" in case of the entity view use-case would be the way to go.
Comment 1 Daniel A. R. Werner 2013-09-11 16:56:32 UTC
not "focus management" but management of "key management", confused this with the similar Bug 54019 for a second.
Comment 2 Daniel A. R. Werner 2013-09-11 17:01:27 UTC
A fast hack for controllers who want to prevent the enter/esc keys from having an effect on the widget's edit mode can be to simply overwrite the "stopEditing" member of the widget via:

 $widget.data( 'widgetname' ).stopEditing = function() {};
Comment 3 Gerrit Notification Bot 2013-10-28 14:26:58 UTC
Change 92310 had a related patch set uploaded by Daniel Werner:
TODO for bug 54021, Snakview should not switch between edit modes on its own!

https://gerrit.wikimedia.org/r/92310
Comment 4 Gerrit Notification Bot 2013-11-05 11:28:27 UTC
Change 92310 merged by jenkins-bot:
TODO for bug 54021, Snakview should not switch between edit modes on its own!

https://gerrit.wikimedia.org/r/92310
Comment 5 Daniel A. R. Werner 2013-11-05 15:38:56 UTC
Above patch-set only adds an inline TODO.
Comment 6 Henning 2014-11-05 14:17:43 UTC
https://gerrit.wikimedia.org/r/#/c/171258/

This seems to be the only (or last) place key handling was done in some *view widget. In previous refactorings, key handling logic has been moved to the toolbar definitions which is done in the change for the snakview as well. If the snakview is to be used on its own, a dedicated toolbar for it would need to be registered anyway. This toolbar would then be responsible for the key handling.

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


Navigation
Links