webclient: Opening link in a new tab from the catalog forces user out of client
Bug #1538675 reported by
Kathy Lussier
This bug affects 16 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I'm guessing this is a side effect of embedding the catalog in an iframe. When using the catalog in the web client, if the user chooses to open a link in a new tab, the user leaves the iframe and loses all of the client navigation menus.
Preferred behavior would be for those links to stay in the iframe when opened in a new tab. Being able to open links in a new tab from a search results page can be very handy for staff.
Changed in evergreen: | |
status: | New → Confirmed |
Changed in evergreen: | |
importance: | Undecided → Medium |
tags: |
added: usability removed: webstaffclient |
tags: | added: performance |
To post a comment you must log in.
If I understand correctly, we use an onchange event handler to make catalog links work within the web client. Clicking a link in the catalog iframe triggers onchange, which calls the handle_page function, which intercepts the click and loads the appropriate staff client page. But opening a link in a new tab/window appears to bypass the event handler.
Generally, you open a link in a new tab/window via the context menu. So I wonder if we could modify the opac_iframe DOM (or add some ctx.is_staff code to the appropriate OPAC templates??) so that, for links matching certain patterns, invoking the context menu would display a custom menu with appropriate actions for that link pattern. For example, right-clicking a link of the form /opac/record/(\d+)/ would display a menu with an option "View record in new tab", which loads /staff/ cat/catalog/ record/ $1 in a new tab.
The handle_page function already does pattern matching on links within opac_iframe, and the client accesses opac_iframe. dom.contentWind ow for stuff like search result hit counts, so hopefully it's not a completely crazy idea. :)