Calixte Denizet
05ca3fd99b
[Editor] Support resizing editors with the keyboard (bug 1854340)
2023-10-04 12:57:37 +02:00
Jonas Jenwald
bf9c33e60f
Add support for "GoToE" actions with destinations (issue 17056)
...
This shouldn't be very common in practice, since "GoToE" actions themselves seem quite uncommon; see PR 15537.
2023-10-04 11:14:23 +02:00
Calixte Denizet
1be9bbd2e1
Compute correctly the bounding box of a transformed rectangle ( fixes #17065 )
2023-10-03 23:50:59 +02:00
Jonas Jenwald
f113320bd5
Ensure that readonly TextWidget-annotations are rendered when forms are disabled (issue 17064)
...
To reduced the risk of regressing something else, given that the issue only applies to a (for the default viewer) non-default configuration, this patch is purposely limited to only TextWidget-annotations in the display layer.
2023-10-03 21:26:08 +02:00
Jonas Jenwald
426209c6e6
Merge pull request #16699 from Snuffleupagus/rm-svg
...
[api-major] Remove the SVG back-end (PR 15173 follow-up)
2023-10-03 15:13:14 +02:00
Jonas Jenwald
0edc490e1b
Merge pull request #16774 from Snuffleupagus/rm-deprecated-options
...
[api-major] Remove various deprecated functionality and options
2023-10-03 15:12:39 +02:00
Calixte Denizet
e3fbe2908a
[Editor] Use the alt text to descibe the canvas used to display the image
2023-10-02 23:28:11 +02:00
Calixte Denizet
eebd251552
[Editor] Don't show the alt-text button when the alt-text dialog is visible
...
This way, the button doens't cover the image.
2023-10-02 20:34:30 +02:00
Jonas Jenwald
3ced0dec1b
[api-major] Remove the SVG back-end (PR 15173 follow-up)
...
This has been deprecated since version `2.15.349`, which is a year ago.
Removing this will also simplify some upcoming changes, specifically outputting of JavaScript modules in the builds.
2023-10-01 23:14:29 +02:00
Calixte Denizet
b65b079ceb
[Editor] Make a deleted (when it was invisible) editor undoable
...
When the editor is invisible (because on a non-rendered page) its parent is null.
But when we undo its deletion, we need to have a parent to attach it.
2023-09-29 16:19:11 +02:00
calixteman
b6d75e736a
Merge pull request #17038 from ayushmourya/master
...
Make downloadManager optional in JSDoc types
2023-09-28 17:23:33 +02:00
Calixte Denizet
4f6fa35a28
[Editor] Disable pointer events in the parent layer while an editor is resized
2023-09-28 15:09:50 +02:00
Calixte Denizet
8417eee0c1
[Editor] Clear the different timeouts when destroying
2023-09-28 12:03:11 +02:00
Calixte Denizet
bdb8410ad4
[Editor] Disabled the alt-text button when the editor is being resized
2023-09-27 15:13:17 +02:00
ayush
87a1baf29f
docs: Make downloadManager optional in JSDoc
2023-09-27 12:47:50 +05:30
calixteman
5f75404bc3
Merge pull request #17030 from calixteman/editor_remove_editing_class
...
[Editor] Remove the class fooEditing from the layer when destroying it
2023-09-25 19:44:50 +02:00
Calixte Denizet
71376f089c
[Editor] Remove the class fooEditing from the layer when destroying it
...
and simplify the way to handle the different types of editors.
2023-09-25 18:56:11 +02:00
Calixte Denizet
29bc103fad
[Editor] Slightly postpone the move in the DOM in order to not block the UI (bug 1854991)
2023-09-25 18:18:01 +02:00
Jonas Jenwald
f87ec67ab1
[api-major] Remove various deprecated functionality and options
2023-09-23 17:44:09 +02:00
Jonas Jenwald
1df31c0284
Use one noContextMenu
function in both the src/- and web/-folders
...
Currently we duplicate this event handler function in multiple places, which seems unnecessary.
2023-09-23 15:37:13 +02:00
Calixte Denizet
88f3ed7745
[Editor] Disable context menu on alt-text button and in the associated dialog
...
but keep it for the text area.
Disable pointerdown on the alt-text button to disable dragging the editor
when the button is clicked (especially when slightly moving the mouse
between the down and the up).
2023-09-22 23:27:55 +02:00
Calixte Denizet
d5936d9a15
[Editor] Let the Save button always enabled in the alt-text dialog
2023-09-22 20:46:29 +02:00
Calixte Denizet
050093c9f5
[Editor] Tweak the save flow in the alt-text dialog
...
When the user edit an existing alt-text and remove it, we want to be able
to save this state and consequently remove the done state from the
alt-text button.
Remove the button from its parent when the editor is removed: it should
help to save few Kb of memory.
2023-09-22 17:10:20 +02:00
calixteman
237b8ce4a8
Merge pull request #16988 from calixteman/alt_text_dialog_others
...
[Editor] Tweak few values after review from UX
2023-09-21 11:03:19 +02:00
Calixte Denizet
b5d18006a7
[Editor] Tweak few values after review from UX
2023-09-21 10:52:58 +02:00
Calixte Denizet
c90ea2314e
[Editor] Add an aria-label to the alt-text button depending on its state
2023-09-20 21:56:16 +02:00
Calixte Denizet
0a278ef0bc
[Editor] Add more telemetry for the 'add image' feature (bug 1853960)
2023-09-20 17:23:23 +02:00
Calixte Denizet
7952a36384
[Editor] Add a tooltip showing the alt text when hovering the alt-text button (bug 1844952)
2023-09-20 10:50:28 +02:00
Calixte Denizet
c162b004ce
[Editor] Remove copy/paste listener when alt text dialog is displayed
2023-09-19 22:41:47 +02:00
Calixte Denizet
c12049db07
[Editor] Allow the user to add and save an alt-text for images (bug 1844952)
2023-09-19 21:46:48 +02:00
Calixte Denizet
a216836fd5
[Editor] Add a button to trigger a dialog for adding an alt text (bug 1844952)
2023-09-18 15:07:09 +02:00
Calixte Denizet
01f9f385d7
[Editor] Change the style of the bounding box and the resizers (bug 1852897)
2023-09-14 09:45:41 +02:00
Calixte Denizet
720963bbe6
[Editor] Move an editor in the DOM just after having moved it on the screen
...
It avoids to have to remember to call moveInDOM after fixAndSetPosition is called.
2023-09-13 10:51:25 +02:00
Calixte Denizet
5646604883
[Editor] Only get back the focus when it has been lost after an editor has been moved in the DOM
2023-09-12 12:17:24 +02:00
Calixte Denizet
c6f7e722c9
[Editor] Add the parent tag id (if any) to the serialized editors (bug 1845087)
...
The tag id will be useful in order to update the StructTree when saving
the pdf.
2023-09-07 18:22:33 +02:00
Calixte Denizet
8ab4e2e6e7
[Editor] Avoid to use parent of editors in destroyed pages
2023-09-07 12:30:29 +02:00
Calixte Denizet
d03494eeff
Only call the focus/blur callbacks when it's necessary (bug 1851517)
...
Focus callback must be called only when the element has been blurred.
For example, blur callback (which implies some potential validation) is not called
because the newly focused element is an other tab, an alert dialog, ... so consequently
the focus callback mustn't be called when the element gets its focus back.
2023-09-05 14:18:51 +02:00
Jonas Jenwald
e7800c22dd
Support downloading FileAttachment annotations with the keyboard
...
While reviewing PR 16898 it occurred to me that it's currently impossible to trigger downloading of FileAttachment annotations using the keyboard.
Hence this patch adds `Ctrl + Enter` as the keyboard shortcut to download those, thus supplementing the existing double-clicking when using a mouse.
2023-09-05 11:31:30 +02:00
Calixte Denizet
a00b542f2f
Unconditionally render non-form annotations in the annotation layer (bug 1851498)
...
The goal is to always have something which is focusable to let the user select
it with the keyboard.
It fixes the mentioned bug because, the annotation layer will now have a container
to attach the canvas for annotations having their own canvas.
2023-09-05 10:41:01 +02:00
Calixte Denizet
7f44f353b3
Make annotations focusable (bug 1851489)
...
When the annotation has a popup then the popup can be toggled in using
the Enter key and hidden in using the Escape key.
2023-09-04 17:12:23 +02:00
Tim van der Meij
1e7c907fbf
Merge pull request #16881 from Snuffleupagus/InternalRenderTask-tweaks
...
A couple of small `InternalRenderTask` changes
2023-09-03 13:05:31 +02:00
Jonas Jenwald
b159cc9e4b
Merge pull request #16888 from stof/fix_jsdoc_types
...
Fix JSDoc types
2023-08-31 16:36:09 +02:00
Calixte Denizet
e7229854bd
Fix the id used in aria-controls used to make a relationship between the popup and its parent
2023-08-31 15:48:32 +02:00
Christophe Coevoet
f84f2646f4
Fix JSDoc types
...
This fixes invalid type references (either due to invalid paths for the
import or missing imports) in the JS doc, as well as some missing or
invalid parameter names for @param annotations.
2023-08-31 13:09:52 +02:00
Calixte Denizet
d185db2b70
Add tagged annotations in the structure tree (bug 1850797)
2023-08-31 12:35:32 +02:00
Jonas Jenwald
1b8441dacc
Don't pass in unused pageColors
to CanvasGraphics.endDrawing
(PR 16380 follow-up)
...
This became unnecessary in PR 16380, however we forgot to update one of the API call-sites.
2023-08-28 16:14:22 +02:00
Jonas Jenwald
9b4efe2c2f
Use WeakSet.prototype.delete()
unconditionally in the InternalRenderTask
class
...
It's not necessary to check if an object exists before trying remove it from a `WeakSet`; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/delete#return_value
2023-08-28 16:10:33 +02:00
Jonas Jenwald
ec3d2be761
Introduce more optional chaining in the code-base
...
Also, use logical OR assignment a bit more.
2023-08-26 10:52:23 +02:00
Calixte Denizet
24b480fabe
Don't reset all fields when the resetForm argument is an array
...
correctly set the readonly property in the annotation layer and set the default checkbox value to Off when none is provided.
2023-08-24 09:10:27 -04:00
Calixte Denizet
ee3ac35e05
Revert fix for bug 1838855 (bug 1849876)
...
The issue described in the mentioned bug is reall because
Acrobat is rendering the XFA instead of the Acroform.
The original patch just tried to workaround the issue but it
induces some regressions.
2023-08-23 12:34:41 -04:00