01-02-2019, 10:56 PM | #1 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Bug: Tabs Closing While Link Stylesheets
Explanation
When you have multiple tabs open + Link Stylesheets, non-active tabs close. Steps to Reproduce Step 1: Open attached EPUB. Step 2: Open all 3 HTML files. Make sure to make one of the files your active tab. For example, Chapter03.xhtml.
Step 3: In the Book Browser, Shift-Click all HTML files + Right-Click and select Link Stylesheets: Step 4: Link the stylesheet and press OK. Bug: All tabs close, and only Chapter03.xhtml is left open. If you have all 3 chapters + stylesheets.css open, the CSS tab also survives. So this bug seems to only close all non-active HTML files. Repeat Steps 1-4, but make sure stylesheets.css is open as your active tab. That'll be the only tab that survives. Expected Results No tabs close. |
01-03-2019, 03:47 AM | #2 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
I was able to reproduce this bug with Windows 10 and Arch Linux (Qt 5.12.0; Sigil built from source).
|
Advert | |
|
01-03-2019, 08:57 AM | #3 |
Zealot
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
|
I was able to reproduce this on Mageia 7 beta with Sigil 0.9.10 from their repository.
|
01-03-2019, 02:34 PM | #4 |
Groupie
Posts: 171
Karma: 3517858
Join Date: May 2016
Location: Monterrey, Mexico
Device: Samsung Tab-3 7"
|
Windows 7, standard Sigil distribution, joined the #Me-Too movement. Interestingly enough, the first time I followed the steps, but un-linking the books, only 1 tab closed, and the other two stayed open. But I haven't been able to duplicate that.
|
01-03-2019, 06:12 PM | #5 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I am away travelling but I will look into fixing this once I return unless DiapDealer beats me to it
|
Advert | |
|
01-03-2019, 06:17 PM | #6 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
So let's say all 3 chapters are opened + Chapter03 is active. If you highlight Chapter01 and Link Stylesheets, Chapter01 tab closes. Chapter02 + 03 tabs remain open. |
|
01-03-2019, 07:00 PM | #7 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
This sounds familiar. Bit I can't quite put my finger on it. I just know I've worked on "closing tabs", and linking either multiple stylesheets (or linking a stylesheet to multiple html files). I'll try to find it and see if they're related.
Has anyone determined if this is new to 0.9.10, or was it present in 0.9.9 or earlier? Last edited by DiapDealer; 01-03-2019 at 07:07 PM. |
01-03-2019, 07:07 PM | #8 |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
This was brought up before...I don't have the link. I thought it had been traced to a QT bug??
|
01-03-2019, 07:26 PM | #9 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I would expect a crash with a Qt bug. We close and reopen tabs all the time in various situations. Something must be firing a signal to close them, but the signal to open them back up is getting lost or dropped. Or the close signal itself is extraneous.
|
01-04-2019, 03:57 PM | #10 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
This is not so much a "bug" as it is a conscious decision (albeit one not everyone is going to love) to close any html tabs that are being linked to the css files that are open (if one of them happens to be the current tab, it will be closed and reopened after) to prevent potential issues.
So the question becomes: is there a different way to avoid the potentially destructive consequences of leaving the tabs open while linking? I'll see what I can see. Even if I reopen all html tabs that were closed, there's no way to guarantee all the tabs will be in the same order they were pre-linking. Last edited by DiapDealer; 01-04-2019 at 04:05 PM. |
01-04-2019, 11:15 PM | #11 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
Archlinux Sigil 0.9.10. Qt 5.12. Thank you for this interesting feature (linking a stylesheet) that I had not seen. And yes, two tabs are closing as previously reported. The main thing however is that all three files can be linked at once to the stylesheet. |
01-14-2019, 04:20 PM | #12 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Hey @KevinH. Did you get a chance to look at this? I quickly found where Sigil is deliberately closing open html tabs (the ones that are being linked). The comments indicate it's being done so that Book View doesn't stomp on the modifications, but I'm not certain if that's still a concern or not. I thought maybe it could be a holdout from htmlTidy days. What are your thoughts? At the very least, I'm thinking a test to see whether BookView is even active before closing the tabs might be in order.
|
01-14-2019, 05:09 PM | #13 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Haven't looked at it yet. Which file has the code that deliberately closes the tabs when linking stylesheets?
|
01-14-2019, 06:53 PM | #14 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
01-14-2019, 07:42 PM | #15 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Wow, according to blame those lines were added way back in June of 2012. I think we should at least check to see if any of the open tabs are in BV mode before closing anything except for the current tab which we then reopen.
How does that sound? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unifying stylesheets | roger64 | ePub | 6 | 08-22-2016 06:29 PM |
Help with stylesheets in Calibre | hikerguy | Editor | 8 | 04-01-2015 02:30 AM |
Stylesheets | Phylis Sophical | Sigil | 10 | 10-28-2014 03:56 PM |
Alternate stylesheets | Jellby | ePub | 1 | 08-19-2011 06:44 PM |