TiddlyWiki5/plugins/tiddlywiki
FlashSystems 3918e59cc1
Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013)
* Fix popup location for tables

This commit introduces the `popupAbsCoords` option to the $button widget
and implements an absolut coordinate format.

Coordinates for popups are stored in the format `(x,y,w,h)`. These
coordinates are relative to the offset parent of the element that
defines the popup.

This commits adds a second format `@(x,y,w,h)`. Coordinates specified in
this format a relative to the pages root element.

The `popupAbsCoords` option of the $button widget enables the use of
this coordinates.

* Unify the declaration of the RegEx for parsing the popup-position

The regular expression was declared in three locations with the same
content. This commit supplies a new function `parseCoordinates` in
`popup.js`. This function returns the parsed coordinates and understands
the classic/absolute coordinates.

This function is used in `reveal.js` and `action-popup.js` to parse the
coordinates.

* Add documentation for coordinate systems

* Consolidate creating coordinate strings

The Popup object now contains a `buildCoordinates` method that can be
used to build coordinate strings. It takes an "enum" for the coordinate-
system to use. This makes everything easily extensible and prevents the
use of magic values.

* Add tests for `parseCoordinates` and `buildCoordinates`

* Add `tv-popup-abs-coords` to `collectDOMVariables`

This will make the absolute coordinates available for the
`DraggableWidget` and the `EventCatcherWidget`.

* Add documentation for the `tv-popup-abs-coords`

... to the `DraggableWidget` and the `EventCatcherWidget`.

* Fix crash when generating a static version of the TW

The Popup class is not initialized in `startup.js` if `$tw.browser` is
not true. After having consolidated the facilities for parsing
coordinate strings into `popup.js` this breaks because the static build
needs to parse coordinate stings even if no Popup module is initialized.
This commit solves this problem by making `readPopupState`,
`parseCoordinates` and `buildCoordinates` static methods of `popup.js`.
It also adds a comment to these functions to show that these can be called
safely even if the Popup-Class is not initialized.
2022-12-01 21:16:44 +00:00
..
async Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
aws AWS Plugin: Add aws-encodeuricomponent filter that also encodes single quotes 2020-09-23 17:32:38 +01:00
bibtex BibTeX Plugin: Force fieldnames to be lowercase 2021-04-07 17:43:41 +01:00
blog Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
browser-sniff Docs for $:/info/browser/is/mobile 2022-07-13 09:32:22 +01:00
browser-storage Browserstorage plugin: don't crash if local storage not available 2022-05-21 15:36:23 +01:00
cecily Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
classictools Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
codemirror Allow global keyboard shortcuts to override all other shortcuts by providing a special field (#6735) 2022-10-07 17:31:04 +01:00
codemirror-autocomplete Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-closebrackets Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-closetag Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-fullscreen-editing Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-emacs Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-sublime-text Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-keymap-vim Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-css Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-htmlembedded Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-htmlmixed Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-javascript Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-markdown Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-mode-x-tiddlywiki Introduce "parent-plugin" field to control how plugins are displayed in the chooser 2019-09-25 16:16:28 +01:00
codemirror-mode-xml Update CodeMirror plugins to v5.58.2 (#4950) 2020-11-01 11:10:00 +00:00
codemirror-search-replace Update CodeMirror to 5.58.3 - fix vim-mode cursor invisible (#5172) 2020-12-01 18:11:40 +00:00
comments Replace various   with tc-small-gap classes (#4926) 2020-10-28 13:13:55 +00:00
consent-banner Consent widget 2020-07-13 11:49:21 +01:00
d3 Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
dynannotate Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
dynaview Dynaview: Fix transclude-when-visible macro 2020-09-23 17:33:00 +01:00
evernote Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
external-attachments Fix external-attachments plugin relative path bug 2020-10-26 18:36:46 +00:00
filesystem Revert "Update sync methods (#5467)" 2021-07-05 19:26:20 +01:00
freelinks Simplify freelinks regexp 2021-09-14 10:22:27 +01:00
github-fork-ribbon Merge branch 'tiddlywiki-com' 2020-04-15 16:03:38 +01:00
googleanalytics Add new "Consent Banner" plugin, and update Google Analytics plugin to use it 2020-06-22 11:31:54 +01:00
hammerjs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
help Help Plugin: Update links to community resources (#7023) 2022-11-05 17:44:41 +00:00
highlight Update highlight.js to v11.4.0 (#6427) 2022-02-21 15:35:13 +00:00
highlight-legacy Update highlight.js to v11.4.0 (#6427) 2022-02-21 15:35:13 +00:00
innerwiki Fix bug with innerwiki template 2021-10-02 16:17:07 +01:00
internals Revert changes to parse tree preview 2022-09-03 10:55:15 +01:00
jasmine Jasmine command (#6944) 2022-11-20 17:54:18 +00:00
jszip JSZip plugin: Fix example formatting 2020-10-19 09:44:55 +01:00
katex Show stylesheets as rendered plain text with highlighting (#6778) 2022-07-14 09:00:56 +01:00
markdown Markdown: Add separate link and linkify buttons (#6693) 2022-05-15 18:47:21 +02:00
menubar Fix layout bug introduced in d5030eb87b 2022-06-17 14:03:36 +01:00
mobiledragdrop Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
nodewebkitsaver Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
pluginlibrary Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
powered-by-tiddlywiki Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
qrcode Fix: add text to QR Code button caption (#6082) 2021-10-02 18:09:11 +01:00
railroad Use this.wiki where applicable (#4601) 2020-05-06 11:27:50 +01:00
savetrail Revert "Update sync methods (#5467)" 2021-07-05 19:26:20 +01:00
sax Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
share Adds $tw.utils.decodeURISafe and $tw.utils.decodeURIComponentSafe (#5999) 2021-08-29 13:39:32 +01:00
stacked-view Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
tahoelafs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
text-slicer Fix ViewToolbar items inconsistent spacing (#5473) 2021-05-24 19:24:37 +01:00
tiddlyweb Adjust position of server page control dropdown (#6767) 2022-07-13 17:28:32 +01:00
translators Add global option to show default text below the edit textarea (#6882) 2022-08-05 17:16:39 +02:00
tw2parser Use this.wiki where applicable (#4601) 2020-05-06 11:27:50 +01:00
tw5.com-docs Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00
twitter Twitter Plugin: Add warning if the wiki needs to be saved and reloaded 2020-04-21 21:22:13 +01:00
twitter-archivist Twitter Archivist: Update todo list 2022-11-15 17:12:54 +00:00
upgrade Move the version number to the top of the upgrader (#6881) 2022-11-14 17:31:30 +00:00
xlsx-utils Xlsx-utils: Fix crash when using deserializer 2021-01-16 15:37:50 +00:00
xmldom Improve plugin metadata, and add a "name" field 2019-09-19 13:04:10 +01:00