mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-14 11:30:12 +01:00
[Bug Fix] Multiple Bug Fixes (#1836)
* Fix the add file button on the multi-tools page. * Fix a bug where the page numbers wouldn't be removed on page move on Firefox. --------- Co-authored-by: kazandaki <ahmetfiratusta@gmail.com>
This commit is contained in:
parent
3c04486348
commit
82219dd899
@ -78,7 +78,7 @@ class PdfActionsManager {
|
|||||||
imgContainer.classList.toggle("split-before");
|
imgContainer.classList.toggle("split-before");
|
||||||
}
|
}
|
||||||
|
|
||||||
setActions({ movePageTo, addPdfs, rotateElement }) {
|
setActions({ movePageTo, addFiles, rotateElement }) {
|
||||||
this.movePageTo = movePageTo;
|
this.movePageTo = movePageTo;
|
||||||
this.addFiles = addFiles;
|
this.addFiles = addFiles;
|
||||||
this.rotateElement = rotateElement;
|
this.rotateElement = rotateElement;
|
||||||
|
@ -53,6 +53,13 @@ class PdfContainer {
|
|||||||
const childArray = Array.from(this.pagesContainer.childNodes);
|
const childArray = Array.from(this.pagesContainer.childNodes);
|
||||||
const startIndex = childArray.indexOf(startElement);
|
const startIndex = childArray.indexOf(startElement);
|
||||||
const endIndex = childArray.indexOf(endElement);
|
const endIndex = childArray.indexOf(endElement);
|
||||||
|
|
||||||
|
// Check & remove page number elements here too if they exist because Firefox doesn't fire the relevant event on page move.
|
||||||
|
const pageNumberElement = startElement.querySelector(".page-number");
|
||||||
|
if (pageNumberElement) {
|
||||||
|
startElement.removeChild(pageNumberElement);
|
||||||
|
}
|
||||||
|
|
||||||
this.pagesContainer.removeChild(startElement);
|
this.pagesContainer.removeChild(startElement);
|
||||||
if (!endElement) {
|
if (!endElement) {
|
||||||
this.pagesContainer.append(startElement);
|
this.pagesContainer.append(startElement);
|
||||||
|
Loading…
Reference in New Issue
Block a user