Skip to content

Commit

Permalink
on clear cleared tooltip too when placeholder present
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamgupta001 authored and alexweissman committed Oct 26, 2017
1 parent e2c654b commit 1cf42cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/select2/selection/single.js
Expand Up @@ -67,8 +67,9 @@ define([

SingleSelection.prototype.clear = function () {

this.$selection.find('.select2-selection__rendered').empty();
this.$selection.find('.select2-selection__rendered').attr('title',''); // clear tooltip on empty
var $rendered = this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.attr('title',''); // clear tooltip on empty
};

SingleSelection.prototype.display = function (data, container) {
Expand Down

0 comments on commit 1cf42cf

Please sign in to comment.