![]() |
#1 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
Bug?
Hi
See attached epub: i can put the cursor anywhere in the "Lopem ipsum" to insert an image (via Insert/File) but not between the "m" and the beginning of the end tag </p>. Then I get an error message "You cannot insert a file here". But this position is valid for an image. Binchen mac os, big sur latest version, sigil latest version |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
It works back on Sigil 0.9.14.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,304
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I've also noticed the same error when trying to insert between <div></div>.
I think the error has to do with being right in front of the tag...which is considered as part of the tag (even though it's not). I'm also pretty sure this was brought up before in another thread, but it may not have been in reference to inserting an image?? |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 860
Karma: 4097942
Join Date: Jun 2012
Location: London, UK
Device: Sony PRS-505, Pocketbook TL3, TL4, TL5
|
I get the same error on my Windows 10 laptop running v1.6.0. I think it was also happening on v1.5.0 but not before that.
|
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Maybe it was an accidental regression introduced by that bugfix. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,475
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Yes a bug. The character under the cursor when it is in that position is the '<' of the ending p tag not the 'm' as it is after the 'm'. This makes Sigil think that you are in a tag and therefore not allowed point. I will have to find the right place in the Sigil source code and handle this as a special case.
The workaround is to add a space before the ending p tag and put the cursor before that space then do the insert image and if you want delete the space afterwards. I will get this fixed in time for 1.8. Thank you for the bug report. |
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,475
Karma: 5703586
Join Date: Nov 2009
Device: many
|
This is now fixed in master. This bug fix will appear in Sigil 1.8 when it is released.
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
![]() |
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 860
Karma: 4097942
Join Date: Jun 2012
Location: London, UK
Device: Sony PRS-505, Pocketbook TL3, TL4, TL5
|
Great & thanks.
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,635
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Maybe it's not a bug, maybe it's related with the bug reported by the OP and maybe is already fixed, but when I have something like:
Code:
<p>This is a text</p> Code:
<p><big>This is a text</p> |
![]() |
![]() |
![]() |
#11 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,475
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Does it have the same issue when using the menu directly as lots of shortcut keys can be absorbed by the system. If so it may be a bug.
|
![]() |
![]() |
![]() |
#12 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,475
Karma: 5703586
Join Date: Nov 2009
Device: many
|
I checked the code and it also appears to need to be special cased too.
Code:
bool CodeViewEditor::IsInsertClosingTagAllowed() { return !IsPositionInTag(textCursor().selectionStart()); } |
![]() |
![]() |
![]() |
#13 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,475
Karma: 5703586
Join Date: Nov 2009
Device: many
|
The fix for this has now been pushed to master.
Thank you for your bug report! |
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,635
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[BUG] - M96 out of memory - [BUG] | Alf77 | Onyx Boox | 5 | 02-05-2015 11:47 AM |
Possible Bug | KyBunnies | Calibre Companion | 3 | 07-26-2014 02:59 PM |
DR800 Help, I've got a bug!! A bug on my screen!! | Franky | iRex | 4 | 06-21-2011 11:45 AM |
Embedded font bug or CSS bug in ADE | JSWolf | ePub | 10 | 06-11-2011 02:34 PM |
PRS-505 bug or eBookLib bug? | porkupan | Sony Reader | 3 | 10-07-2007 10:44 PM |