Modals close when `mouseup` event triggered outside modal bounds
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Bug Report
**Current Behavior**
Popups close unexpectedly when a pressed mouse button is being released (`mouseup` event) outside the bounds of a popup.
This is particular frustrating when there is a large chunk of text that had just been entered into a text field inside the popup.
It happens quite often (at least for me) that I press down the mouse inside the popup and release it outside, e.g. when selecting a range of text with the mouse and the margin between text field and popup bound is very small.
**Steps to Reproduce**
1. Click "Start a discussion" button
2. Click on 'Choose Tags'
3. Close popup with X (interestingly, the issue doesn't happen on the first try)
4. Click on 'Choose Tags' again
5. Press mouse button down anywhere inside the popup
6. Move mouse outside the popup and release the key
7. Popup closes
**Expected Behavior**
Popup only closes when clicked outside popup (mouseup *and* mousedown outside the popup bounds)
**Environment**
- Flarum version: 0.1.0-beta.16
- Webserver: apache
- Hosting environment: shared
- PHP version: 7.4.16
- Browser: Edge 89.0.774.54
```
Flarum core 0.1.0-beta.16
PHP version: 7.4.16
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, restrictdocroot, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, json, ldap, exif, mysqlnd, PDO, pgsql, Phar, posix, shmop, SimpleXML, soap, sockets, sodium, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlwriter, xsl, mcrypt, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, xmlreader, xmlrpc, apcu, decimal, gnupg, igbinary, imagick, mailparse, msgpack, psr, yaml, zip, mongodb, phalcon, redis, Zend OPcache
+---------------------------------+----------------+--------+
| Flarum Extensions | | |
+---------------------------------+----------------+--------+
| ID | Version | Commit |
+---------------------------------+----------------+--------+
| flarum-flags | v0.1.0-beta.16 | |
| flarum-tags | v0.1.0-beta.16 | |
| flarum-approval | v0.1.0-beta.16 | |
| flarum-bbcode | v0.1.0-beta.16 | |
| flarum-emoji | v0.1.0-beta.16 | |
| flarum-lang-english | v0.1.0-beta.16 | |
| flarum-lock | v0.1.0-beta.16 | |
| flarum-markdown | v0.1.0-beta.16 | |
| flarum-mentions | v0.1.0-beta.16 | |
| flarum-sticky | v0.1.0-beta.16 | |
| flarum-subscriptions | v0.1.0-beta.16 | |
| flarum-suspend | v0.1.0-beta.16 | |
| fof-polls | 0.3.2 | |
| fof-oauth | 0.2.1 | |
| flarum-likes | v0.1.0-beta.16 | |
| fof-split | 0.6.0 | |
| flarum-nicknames | v0.1.0-beta.16 | |
| fof-upload | 0.12.10 | |
| askvortsov-discussion-templates | v0.6.0 | |
+---------------------------------+----------------+--------+
Base URL: https://diarium.timopartl.com
Installation path: /var/www/virtual/tipako/flarum_diarium
Debug mode: off
```
Contributor guide
Assessment
This issue has not been assessed yet.