To avoid the "Scripts may close only the windows that were opened by
them" console message in Chrome 88, and a similar message in Firefox
84, when clicking "Save & Exit" in the Volume/Copy editor of the
AngularJS staff client after opening it via the "edit" link in the
copy table of the TT OPAC record summary, we use an onclick handler
with window.open instead of a standard href in the edit anchor.
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
[% IF ctx.has_perm('UPDATE_COPY', copy_info.circ_lib)
OR ctx.has_perm('UPDATE_COPY', copy_info.call_number_owning_lib) %]
<span> | </span>
- <a target="_blank" href="[% ctx.base_path %]/staff/cat/item/[% copy_info.id %]/edit">[% l('edit') %]</a>
+ <a href="javascript:;" onclick='window.open("[% ctx.base_path %]/staff/cat/item/[% copy_info.id %]/edit", "_blank");'>[% l('edit') %]</a>
[% END %]
[% ELSE %]
<a onclick="xulG.new_tab(xulG.urls.XUL_COPY_STATUS, {}, {'from_item_details_new': true, 'barcodes': ['[%- copy_info.barcode | html | replace('\'', '\\\'') -%]']})"