jenkins-bot has submitted this change and it was merged.

Change subject: Prevent destroying edittoolbar error tooltip if destroyed 
already
......................................................................


Prevent destroying edittoolbar error tooltip if destroyed already

Change-Id: I3bffdba6d180ccb6aa5639a8fa94b0dd1d4ed003
---
M lib/resources/jquery.wikibase/toolbar/edittoolbar.js
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
index 4b25dfe..7bec417 100644
--- a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
@@ -336,10 +336,12 @@
                        } );
                        $anchor.data( 'wbtooltip' ).show();
 
-                       $anchor.on( 'wbtooltipafterhide', function( e ) {
+                       $anchor.one( 'wbtooltipafterhide', function( e ) {
                                self.element.removeClass( 'wb-error' 
).addClass( 'wb-edit' );
                                self._interactionWidget.setError();
-                               $anchor.data( 'wbtooltip' ).destroy();
+                               if( $anchor.data( 'wbtooltip' ) ) {
+                                       $anchor.data( 'wbtooltip' ).destroy();
+                               }
                        } );
                },
 

-- 
To view, visit https://gerrit.wikimedia.org/r/78369
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3bffdba6d180ccb6aa5639a8fa94b0dd1d4ed003
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <henning.sna...@wikimedia.de>
Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to