Prevent external links (like the Preview button) to trigger the "Changes Detected" notice (fixes #689)

This commit is contained in:
Djamil Legato
2016-07-08 21:42:19 -07:00
parent 9f14a6fd91
commit 39cffadbf5
3 changed files with 3 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
1. [](#improved)
* It is now possible to sort the Plugins and Themes views by 'Name', 'Author', 'GravTeam', 'Release Date', 'Updates Available' and 'Testing' releases (if in Testing Channel), both Ascending and Descending. [#583](https://github.com/getgrav/grav-plugin-admin/issues/583)
* Prevent external links (like the Preview button) to trigger the "Changes Detected" notice [#689](https://github.com/getgrav/grav-plugin-admin/issues/689)
# v1.1.0-rc.4
## 06/21/2016

View File

@@ -25,7 +25,7 @@ const DOMBehaviors = {
},
preventClickAway() {
let selector = 'a[href]:not([href^="#"])';
let selector = 'a[href]:not([href^="#"]):not([target="_blank"])';
if ($._data($(selector).get(0), 'events') && ($._data($(selector).get(0), 'events').click || []).filter((event) => event.namespace === '_grav')) {
return;

File diff suppressed because one or more lines are too long