Skip to content

Commit

Permalink
Fix for tooltip not closing
Browse files Browse the repository at this point in the history
  • Loading branch information
chris360KS committed Jan 9, 2020
1 parent ca9046c commit eef87a1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

- fix for reformatting of cards
- fix for tooltip not closing
- exclude list for words to ignore

## v0.2.0 - 2019-01-09
Expand All @@ -16,6 +15,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Multi language support (change in config.json, default `en`)

### Fixed

- fix for tooltip not closing


## v0.1.0 - 2019-01-08

### Added
Expand Down
24 changes: 13 additions & 11 deletions popup_wikipedia/web/wiki_popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ $(document).ready(function () {
classes: 'qtip-bootstrap',
},
// don't set up any hide event triggers, do it manually instead
hide: false,
hide: {
event: 'unfocus'
},
// wait until called upon
show: false,
events: {
hide: function (event, api) {
// hide next nested tooltip on hide
let ttID = api.get('id');
let ttID_next = "#qtip-" + (ttID + 1);
$(ttID_next).qtip('hide');
}
}
// events: {
// hide: function (event, api) {
// // hide next nested tooltip on hide
// let ttID = api.get('id');
// let ttID_next = "#qtip-" + (ttID + 1);
// $(ttID_next).qtip('hide');
// }
// }
}).qtip('api');

// Custom double click event handler that works across
Expand Down Expand Up @@ -126,7 +128,7 @@ $(document).ready(function () {
return;
}

// Determine current qtip ID and ID of potential child tooltip
// // Determine current qtip ID and ID of potential child tooltip
let ttID = tooltip.get('id');
console.log(ttID);
let domID = "#qtip-" + ttID;
Expand All @@ -140,7 +142,7 @@ $(document).ready(function () {
console.log("Set text");
tooltip.show();
// Need to scroll to top if tooltip has been drawn before
$(domID + "-content").scrollTop(0);
// $(domID + "-content").scrollTop(0);

// Nested tooltips
// create child tooltip for content on current tooltip
Expand Down

0 comments on commit eef87a1

Please sign in to comment.