Bug 970807 - When you click a Docbuilder Edit Topic link, it doesn't open in a new tab.
When you click a Docbuilder Edit Topic link, it doesn't open in a new tab.
Status: NEW
Product: PressGang CCMS
Classification: Community
Component: DocBook-builder (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: pressgang-ccms-dev
: 1043319 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2013-06-04 20:36 EDT by Jared MORGAN
Modified: 2015-08-09 21:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jared MORGAN 2013-06-04 20:36:17 EDT
Description of problem:

When you are proofing a Docbuilder doc, and spot an error in the document, you click the edit topic link and the topic opens in the same tab. You fix the error, then use the back button to return to docbuilder. But your position is lost and you have to try and remember where you were up to again. 

Version-Release number of selected component (if applicable):

Build 201305221423

How reproducible:


Steps to Reproduce:
1. From a docbuilder build, click an Edit this topic link.
2. Click back to the docbuilder build.
3. Observe the behavior.

Actual results:

The position in the docbuilder build resets to the top of the book, not where you previously were. This may have something to do with the fact that there are no IDREFs in the URL like there are on docs-stage.

Expected results:

You are returned to the position you were in in the document, or the edit topic window opens in a new tab.

Additional info:

This was encountered on Chrome.
Comment 1 Lee Newson 2013-06-04 20:49:50 EDT
Unfortunately this is something we can't do anything about easily and would have to do some post processing to achieve this (ie after a publican build). The problem is that to make it open in a new tab you have to set the href target to "_blank", however this has to be done during the XSL transformation and the docbook xsl stylesheets only allow the target parameter to be set on a global scale.

So to do this, here are some steps that I see we could take:

1. Do a second XSL transformation on the HTML to fix the Edit Links.
2. Alter the HTML and include some JavaScript to make the edit links open in a new window.
3. Look into incorporating the Anchor used for the current placement into the GWT application url (although this still wouldn't work when scrolling the document)
Comment 2 Jared MORGAN 2013-06-04 21:28:17 EDT
As a work-around, you just need to remember to use your muscle memory and "open in new tab". Which I'm quite happy to develop in the short term. 

Could we just use a combination of Greasemonkey scripts in the short term? One that treats all Edit this topic links as new tabs? I know it isn't a solid long term solution, but it could be a quick fix in the short term?
Comment 3 Lee Newson 2013-06-04 21:54:06 EDT
Hehe, I was actually going to create a GreaseMonkey script to do that anyways :)
Comment 5 Joshua Wulf 2013-12-15 18:13:18 EST
Additional reason: there is a lot of javascript processing happening on the page. You click a "edit this topic" link and you lose all of that spell checking, link checking, duplicate topic checking, etc.

When you realize that you opened the topic in the same tab to edit it, and click back, the page has to do all that client-side work again, and it takes a significant amount of time.

Using javascript to make the topics open in a new tab is pretty easy. It could be added to the Presszilla script.
Comment 6 Joshua Wulf 2013-12-15 18:15:02 EST
*** Bug 1043319 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.