Henning Snater has uploaded a new change for review.
https://gerrit.wikimedia.org/r/51655
Change subject: Improving focusing after "add" action in statements UI
......................................................................
Improving focusing after "add" action in statements UI
After ending a statement section's "add" action (e.g. by canceling), the focus
is
not moved to the general "add" button anymore but to the section's add button.
Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
---
M lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
2 files changed, 1 insertion(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/55/51655/1
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
index 9cec3fe..0c88fc4 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
@@ -133,9 +133,6 @@
.on(
prefixed( 'itemadded ' ) + prefixed(
'itemremoved ' ) + prefixed( 'canceled' ),
function( event, value, $node ) {
- if ( value === null ) {
- return;
- }
if ( $node !== undefined &&
$node.parent()[0] !== self.element.parent()[0] ) {
// The event does not belong to
this "add" button but rather to an "add"
// button encapsulated in a
descendant node.
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 48d9901..3bfd45f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -426,7 +426,7 @@
if( dropValue || !self._lmwInstance( $newClaim
).$mainSnak.data( 'snakview' ).snak() ) {
// if new claim is canceled before saved, or if
it is invalid, we simply remove
// and forget about it
- self._trigger( 'canceled', null, [ $newClaim ]
);
+ self._trigger( 'canceled', null, [ null,
$newClaim ] );
self._lmwInstance( $newClaim ).destroy();
$newClaim.remove();
--
To view, visit https://gerrit.wikimedia.org/r/51655
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits