]> git.proxmox.com Git - pmg-gui.git/commit
RegexTester: fix getting reference to regex field
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 12 Nov 2020 17:57:57 +0000 (18:57 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 13 Nov 2020 07:10:42 +0000 (08:10 +0100)
commit4eaa2d3607c1ac43785fe452d59189156eb74f4f
treed4034ebdc2c22859ff5ba323ad21391ec7549845
parentb067a9d6c3b1c00f80a2d1c19389ff767a121b3f
RegexTester: fix getting reference to regex field

the regular expression field is not necessarily after the regex tester
(mostly it is before). In order to be more robust, use the child
method of the parent window instead of previousSibling of the button.

The child method gets any direct descendant matching the query, the
sibling one is always directional and there's no method for "any
sibling".

Tested with:
* mailproxy whitelist
* match field
* match filename
* who object

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
js/RegexTester.js