HTML 5 output - "expand all" avoid double klick

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
rpa
Propeller Head
Posts: 36
Joined: Mon Jun 10, 2013 3:47 am
Location: Thurgau, Switzerland
Contact:

HTML 5 output - "expand all" avoid double klick

Post by rpa »

Hy everbody

I browsed the forum as well as the online-help but couldn't find any help/solution.

In the online-help (HTML5) I'm writing, I use a lots of drop-down text. Thanks to the funktion "expand all", the user can see all the content hidden in drop-downs. If the user klicks in one topic on the "expand-all" button, all the content will be shown. Everything fine so far. Now, when switching to an other topic, he needs to double-klick on the "expand-all" button to see all the content of this other topic. A behavoir which can also be seen in the MadCap online-help.

This brings me to my question: Is there a way to change the "expand-all" function that it is always on the status closed when a new topic is opened in order to avoid the double-klick?

Thanks in advance for your help.

kind regards, Patrick
devjoe
Sr. Propeller Head
Posts: 342
Joined: Thu Jan 23, 2014 1:43 pm

Re: HTML 5 output - "expand all" avoid double klick

Post by devjoe »

Is there any solution for this problem? I am seeing it with my HTML5 output from Flare 10.2. After Expanding All in one topic, then navigating to another topic which has dropdowns, the Expand All button is still in Collapse All mode, and has to be clicked twice to Expand All.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: HTML 5 output - "expand all" avoid double klick

Post by doc_guy »

This looks like a weird bug to me. Have you reported it to MadCap?

https://www.madcapsoftware.com/feedback/bugs.aspx
Paul Pehrson
My Blog

Image
mlaird
Propeller Head
Posts: 49
Joined: Wed Feb 06, 2013 3:18 pm

Re: HTML 5 output - "expand all" avoid double klick

Post by mlaird »

I'd say this is definitely a bug. I can tell you exactly what's happening, though!

The 'Expand All' button has a parameter called 'data-current-state' which is either "1" when the button is used to expand all of the content in the current topic and "2" when the button is used to collapse all of the content. You'll notice the hovertext changes from "Expand All" to "Collapse All", as well as the css class of the button and some other parameters, when it is clicked.

So what happens when you click the button once and then navigate to a new topic is that the content is collapsed by default, but if you hover over the button in the skin, you'll see that the hovertext still says 'collapse all' and if you look at the code, the 'data-current-state' is still set to 2, even though it actually isn't, in the current topic.

So to expand everything, you need to click once to reset the button, which turns the 'data-current-state' back to 1 and turns the button back into an Expand All button. Then when you click on it a second time, you get the expand all behavior that you would expect.

To fix this, the Flare javascript should reset the state of that button when you navigate to a new topic in the topic frame. I don't think there's anything you can do to fix this without modifying or adding to the javascript that runs on the page. I say file it as a bug.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: HTML 5 output - "expand all" avoid double klick

Post by doc_guy »

And when you file it as a bug, include the URL to this topic so they can see all the good info mlaird included above.
Paul Pehrson
My Blog

Image
mneedles
Jr. Propeller Head
Posts: 5
Joined: Tue Nov 17, 2015 11:22 am

Re: HTML 5 output - "expand all" avoid double klick

Post by mneedles »

Does anyone have an update to this?

Or possibly even share how they fixed it themselves?
Post Reply