#StackBounty: #footnotes #bigfoot Unwanted vertical space with `FN@beforebreak` in `bigfoot`

Bounty: 100

I use bigfoot for creating two types of footnotes. And also I want to place dots when long footnote continues on next page (FN@beforebreak). I use raisebox{12pt}[0pt][0pt] and it should be 0 height. But there still appears vertical space after the footnote break.

MWE (overleaf):

documentclass{article}
usepackage{blindtext}
usepackage{bigfoot}

DeclareNewFootnote{default}
DeclareNewFootnote{B}[alph]

setlength{skipfootinsB}{0pt}

% fix bug in bigfoot 2015/08/30 2.1
% see https://tex.stackexchange.com/questions/471379/footnote-marks-missplaced-with-bigfoot/
usepackage{xpatch}
makeatletter
patchcmdFN@allmarks{266}{256}{}{fail}

renewcommandFN@beforebreak{hbox{%
raisebox{12pt}[0pt][0pt]{hspacetextwidth~dots{}}%
}}
makeatother

begin{document}
Blindtext[1][1]
blindtext[1]footnote{Blindtext[3][2] New line}
Some wordsfootnoteB{See the vertical space}
Blindtext[2][1]
TextfootnoteB{no vertical space}

end{document}

Preview before break:

enter image description here

Preview without break:

enter image description here


Get this bounty!!!

#StackBounty: #errors #footnotes #bigfoot Footnote marks missplaced with bigfoot

Bounty: 150

With big foot package sometimes footnote text is placed on other page then corresponding footnote mark. MWE:

documentclass[11pt, b5paper, final]{memoir}

usepackage[english]{babel}
usepackage[pangram]{blindtext}

usepackage{bigfoot}
DeclareNewFootnote{default}
DeclareNewFootnote{B}[roman]

begin{document}
blindtext[10]footnote{blindtext[20]}
blindtext[5]footnote{
blindtext[10]footnoteB{blindtext[1]}
blindtext[30]}
blindtext[10]footnote{blindtext[40]}
end{document}

Preview:

enter image description here
enter image description here

However if I create similar document without bigfoot it works as expected. MWE

documentclass[11pt, b5paper, final]{memoir}

usepackage[english]{babel}
usepackage[pangram]{blindtext}

begin{document}
blindtext[10]footnote{blindtext[20]}
blindtext[5]footnote{
blindtext[10]
blindtext[30]}
blindtext[10]footnote{blindtext[40]}
end{document}

Preview:

enter image description here
enter image description here

Question how can I fix bigfoot that marks appear on same page as text? I can choose other package for footnotes, but i need insert second level footnotes into first level footnote (as in bigfoot MWE).


Get this bounty!!!