Bug 29937 - class close, close the full windows
Summary: class close, close the full windows
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-25 11:03 UTC by Hugo Agud
Modified: 2024-07-04 20:37 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Agud 2022-01-25 11:03:18 UTC
Good morning we have found something it could be an issue or not.. ;)

https://github.com/Koha-Community/Koha/blob/master/koha-tmpl/opac-tmpl/bootstrap/js/script.js#L40

$(document).ready(function(){
    $(".close").click(function(){
        window.close();
    });

the issue is basically that we assign a class $('.close') to do window.close()


We do have that handler bound to the class close, which can be considered a bit loose in scope and lead to clashes.

We have added a js on mainuserblock with .close, and when it clicks, close the full browser tab ;), of course we can change the class, but I think it is something to consider if change that code ;)

cheers
Comment 1 Katrin Fischer 2023-06-25 11:29:39 UTC
I believe this is a non-issue. The close is speaking and we also have required and hint as classes. When adding your own code, maybe adding a prefix for your library/installation could be a good habit to avoid unwanted clashes.