![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
|
Shift+Enter Bug?
Hi all.
Does anybody have problem when hit shift+enter to break a line? Sometimes, instead of make a simple <br/> it creates a <div ...>, and after closing the div a <p></p>. I'm using Windows 10 and Sigil 0.9.8. Cheers and anyway thanks for the software, it's really helpful. Last edited by aleksei_iv; 05-30-2017 at 10:11 AM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
When in Book View, tags are automatically generated based on the surrounding (existing) tags. When hitting enter, p tags generate more p tags; divs generate more divs. As far as I know, hitting enter never creates a br tag. I've no idea what the significance of shift + enter is supposed to be. It probably depends on the surrounding code as well. Whatever it is would be down to Qt's QTextEdit/QtWebKit. Keep in mind that Book View is not Word.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
In most word processors shift+enter is a soft line break. In HTML this is often translated at a <br/>.
|
![]() |
![]() |
![]() |
#4 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
|
Thanks for the help.
On Sigil, Shift+Enter generates a line break: <br/>. It is a HTML after all. But it looks like there are some bugs in this latest version of the software. And that is correct, DiapDealer. If you only press only Enter (without Shift) a new paragraph will be created duplicating the same style. If anyone still has some ideas... Ta! ![]() ![]() |
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() In my quick experimentation with this, I've used the following code: Code:
<body> <p>hello1</p> <div>hello2</div> <blockquote>hello3</blockquote> </body> Code:
<body> <p><br/>hello1</p> <div><br/>hello2</div> <blockquote><br/>hello3</blockquote> </body> Code:
<body> <p>hello1<br/><br/></p> <div>hello2<br/><br/></div> <blockquote>hello3<br/><br/></blockquote> </body> |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
|
Hm...
![]() Cheers ![]() |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If you can isolate it, that would be great. I can't guarantee we'll be able to do anything about it, but we can sure try!
![]() |
![]() |
![]() |
![]() |
#8 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
|
Sorry for the delay in answering, I had to format my computer.
So far I could see that this problem happens on EPUB 2.0 with at least one class and attributes set for <p>. Try like this: 1--> Create an 2.0 EPUB 2--> Copy these lines on the page's code: <p class="noind">Non onono nono nonono,</p> <p>nono nono nonono no no nono nonono no no no...</p> 3--> Create a CSS with these classes (of course, don't forget to link it to the page): p{ text-indent:1.5em; } .noind { text-indent:0em; } 4--> Save it before anything (just if you want to experiment other ways) 5--> Now, go to BOOK VIEW, join these two lines (from step 2) on the page (with backspace or del) and hit SHIFT+ENTER to separate them again but with </br> this time. It'll look like this: <p class="noind">Non onono nono nonono,<br/></p> <div style="text-indent: 0px;"><span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span></div> <p></p> Last edited by aleksei_iv; 06-01-2017 at 09:08 PM. |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That's bizarre! I can definitely duplicate it. The span creation alone (where the css provided text-indent attribute is added as an inline attribute) when joining the two lines with del/backspace is baffling enough. I'll have to do some testing to see if this is because of any recent changes, or if it's been around a while, but unnoticed.
I know nobody likes to hear it, but it's another of many reasons that editing in Book View is a bad idea (and probably another nail in Book View's coffin). Last edited by DiapDealer; 06-01-2017 at 11:31 PM. |
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,687
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,687
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
BTW, the code is not 100% identical. With Sigil 0.7.4 and 0.8.6. I got:
Code:
<p class="noind">Non onono nono nonono,<br /></p> <div style="text-indent: 0px;"> <span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span> </div> Code:
<p class="noind">Non onono nono nonono,<br/></p>
<div style="text-indent: 0px;"><span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span></div>
<p></p>
BTW, I got the following code with Sigil 0.7.4, 0.8.9 and 0.9.8, when I just hit the Enter key: Code:
<p class="noind">Non onono nono nonono,</p> <p class="noind"><span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span></p> |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
After joining the two lines with delete/backspace? I only ask because with my (admittedly hasty) investigation, the span was generated when joining the two lines with del/bksp -- regardless of whether a Shift/Shift+Enter followed. "Enter", for all intents and purposes, is doing exactly as it's intended to do in that situation, I believe. Or did you mean something else?
|
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,687
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,373
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
OK. Then yes ... given the condition generated by the backspace (switch to Code View immediately after the backspace to verify that the span has already appeared), the "Enter" seems to be doing exactly what it would in any other circumstance: start a new block element that matches the previous one, including attributes.
Last edited by DiapDealer; 06-02-2017 at 10:40 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
iOS 9.3 out now with Night Shift | Jessica Lares | Apple Devices | 32 | 04-07-2016 05:18 AM |
[BUG] Order of selections in Remove Style Information shift around | Katsunami | Editor | 4 | 09-27-2015 05:25 PM |
Alt+Shift+B | copyrite | Calibre | 5 | 08-16-2012 03:44 PM |
Paradigm Shift e-reader | Marc_liest | Andere Lesegeräte | 3 | 04-22-2010 05:58 AM |
Default for alt-shift-# is...? | Neil | Amazon Kindle | 2 | 07-04-2009 04:51 PM |