Henning Snater has uploaded a new change for review.
https://gerrit.wikimedia.org/r/142510
Change subject: Removed event handling from entitysearch widget
......................................................................
Removed event handling from entitysearch widget
Event handling hindered middle/right click to work on entity search suggestions.
Change-Id: I4147c54a8f306092187159c6d86b93d93152931a
---
M repo/resources/wikibase.ui.entitysearch.js
1 file changed, 11 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/10/142510/1
diff --git a/repo/resources/wikibase.ui.entitysearch.js
b/repo/resources/wikibase.ui.entitysearch.js
index 6677583..35c1e8e 100644
--- a/repo/resources/wikibase.ui.entitysearch.js
+++ b/repo/resources/wikibase.ui.entitysearch.js
@@ -11,7 +11,15 @@
$.widget( 'wikibase.entitysearch', $.wikibase.entityselector, {
/**
- *@see jQuery.ui.entityselector._createMenuItemFromSuggestion
+ * @see jQuery.wikibase.entityselector._create
+ */
+ _create: function() {
+ $.wikibase.entityselector.prototype._create.call( this
);
+ this.element.off( 'blur' );
+ },
+
+ /**
+ *@see
jQuery.wikibase.entityselector._createMenuItemFromSuggestion
*/
_createMenuItemFromSuggestion: function( suggestion ) {
var $label = this._createLabelFromSuggestion(
suggestion ),
@@ -21,7 +29,7 @@
},
/**
- * @see jQuery.ui.entityselector._createMenuItemFromSuggestion
+ * @see
jQuery.wikibase.entityselector._createMenuItemFromSuggestion
*/
_initMenu: function( ooMenu ) {
$.wikibase.entityselector.prototype._initMenu.apply(
this, arguments );
@@ -29,10 +37,7 @@
ooMenu.element.addClass( 'wikibase-entitysearch-list' );
$( ooMenu )
- .off( 'selected' )
- .on( 'selected.entitysearch', function( event, item ) {
- location.href = item.getEntityStub().url;
- } );
+ .off( 'selected' );
return ooMenu;
}
--
To view, visit https://gerrit.wikimedia.org/r/142510
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4147c54a8f306092187159c6d86b93d93152931a
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