Sam Thorogood
5033aac1b7
Merge pull request #214 from GoogleChrome/fix-submitter
...
fix possible .submitter being null
2021-01-11 11:42:03 +11:00
Sam Thorogood
840c5e5f68
fix bad patch
2021-01-11 11:32:29 +11:00
Sam Thorogood
90764c6e3a
fix possible .submitter being null
2021-01-11 11:28:49 +11:00
Sam Thorogood
75df500d65
Merge pull request #213 from hadriann/patch-nearest-dialog
...
Fix detection of nearest dialog for shadow DOM usage (#189 )
2021-01-07 11:17:00 +11:00
Adrian Nita
fa3ba8c92d
Fix detection of nearest dialog for shadow DOM usage ( #189 )
2021-01-06 17:44:49 +02:00
Sam Thorogood
cd2f54731d
artifacts
2020-11-12 19:05:19 +11:00
Sam Thorogood
bbe8bab175
support formmethod
2020-11-12 19:05:10 +11:00
Sam Thorogood
c1390194e9
bump rev
2020-11-12 15:41:52 +11:00
Sam Thorogood
982184d68c
prevent SD submit
2020-11-12 15:36:55 +11:00
Sam Thorogood
bf24e2351b
basic sd test
2020-11-12 10:15:40 +11:00
Sam Thorogood
33020332cc
Merge pull request #210 from qurben/master
...
Fix types for ESM
2020-11-10 08:27:30 +11:00
Gerben Oolbekkink
c1f3216d06
Export the dialogPolyfill const
2020-11-09 08:47:48 +01:00
Gerben Oolbekkink
ad02814669
Fix types for ESM
...
Fixes GoogleChrome/dialog-polyfill#204
2020-11-06 17:45:51 +01:00
Sam Thorogood
ddf9a02425
fix exported type
2020-08-11 13:20:50 +10:00
Sam Thorogood
a9a4ea4ed3
support oncancel and onclose
2020-07-27 10:35:19 +10:00
Sam Thorogood
aa1dbd3d9c
update README
2020-07-27 10:23:15 +10:00
Sam Thorogood
007fc3a91d
ignore more files in deploy
2020-07-27 10:23:04 +10:00
Sam Thorogood
a273702ff1
backdrop demo
2020-07-27 10:22:09 +10:00
Sam Thorogood
167567548c
add types
2020-07-27 10:08:34 +10:00
Sam Thorogood
e02c85df4a
add demos
2020-07-27 10:08:28 +10:00
Sam Thorogood
ee55b3d9f0
Merge pull request #177 from brettz9/patch-1
...
Use long-term stable URL
2020-05-15 21:27:53 +10:00
Sam Thorogood
1b42b1bb71
Merge pull request #198 from hadriann/master
...
Fix focus of dialog inputs within shadow DOM (#189 )
2020-05-15 21:03:06 +10:00
Sam Thorogood
52ad80e85d
Merge pull request #197 from Jehoel/patch-1
...
Forward mouseup and mousedown too.
2020-05-15 21:00:38 +10:00
Adrian Nita
9dc839397f
Fix focus of dialog inputs within shadow DOM ( #189 )
2020-05-15 13:49:19 +03:00
Dai
b9eef9f95b
Forward mouseup and mousedown too.
...
In my application, I detect clicks on the backdrop by comparing the `MouseEvent`'s x and y coordinates to the dialog's box dimensions and closing the dialog if the user clicked on the backdrop.
However I can't simply use the 'click' event because my dialogs are resizable (using the browser native resize grip in the bottom-right corner of the dialog). If a user drags the resize handle to make the dialog bigger - and if the dialog has a `max-width` and/or `max-height` and the user keeps on dragging the mouse cursor and releases their mouse button over the backdrop then the 'click' event is raised with the `MouseEvent` coordinates over the backdrop - so I use the mouseup and mousedown events to detect if the mouse moved between the backdrop and the dialog-proper (again, by comparing coordinates of the MouseEvent with the size of the dialog-proper), and based on that it either ignores the click or it closes the dialog.
My solution works with this Polyfill library, but I first needed to invoke the `backdropClick_` function for `mouseup` and `mousedown` events - so this is me contributing those trivial changes back.
2020-04-28 02:45:37 -07:00
Sam Thorogood
8b458a4b76
bump
2020-04-11 00:32:50 +10:00
Sam Thorogood
0186a7de35
Merge pull request #194 from hadriann/master
...
Fix showModal error inside shadow DOM (#186 )
2020-04-11 00:27:06 +10:00
Adrian Nita
184c157c7e
Rebuild after fixing DOM connection check
2020-04-10 15:10:41 +03:00
Adrian Nita
260a3cf72c
Fix DOM connection check
2020-04-10 15:09:39 +03:00
Adrian Nita
4aa1a40958
Fix showModal error inside shadow DOM ( #186 )
2020-04-10 12:30:55 +03:00
Sam Thorogood
975675bd97
Merge pull request #179 from ChadKillingsworth/focus-with-shadow-dom
...
Support finding focusable items in custom element shadow roots
2020-01-30 13:40:29 +11:00
Chad Killingsworth
5a90ee11f0
Address review issues
2020-01-07 04:55:06 -07:00
Chad Killingsworth
cc373de0f6
Fix compilation warnings in closure-compiler
2020-01-03 06:27:08 -06:00
Sam Thorogood
fe4c333a7e
Merge pull request #192 from runarberg/master
...
Adhere to `event.defaultPrevented` on form submit events
2019-10-29 12:27:44 +11:00
Rúnar Berg
9525dfdf4e
Adhere to `event.defaultPrevented` on form submit events
...
Fixes : #191
2019-10-28 15:01:04 -07:00
Sam Thorogood
9abb93c0cf
Merge pull request #184 from wowczarek/patch-1
...
Support for explicit `onclose` handler
2019-09-03 09:09:16 +10:00
Wojciech Owczarek
7d8afc7de9
Support for explicit `onclose` handler
...
Some existing browser implementations of `HTMLDialogelement` handle the `onclose` property. Since `onclose` defines a single handler, it is extremely useful when reusing dialogs, as opposed to `addEventListener()`, where there is no ready or easy or clean way to clear all existing handlers. With `onclose` a dialog element can be used as a template and just have `onclose` assigned to whatever handler if and when necessary.
2019-09-02 15:35:34 +01:00
Chad Killingsworth
8acdd3c6a9
Find a focusable item inside any element which has a shadowRoot
...
Correctly blur the currently focussed item when it is inside a shadow root.
2019-04-08 08:59:15 -05:00
Chad Killingsworth
f95f79c3f2
Support finding focusable items in custom element shadow roots
2019-04-05 07:17:36 -05:00
Brett Zamir
884adf5820
Use long-term stable URL
...
While the files are the same now, better to point to `dist` ESM instead of source in case source files are split up or require dependencies.
2019-03-13 00:51:50 +08:00
Sam Thorogood
8214290d1e
v0.5.0
2019-03-11 13:20:23 +11:00
Sam Thorogood
7918d81280
Merge pull request #176 from mreinstein/master
...
support esm, cjs modules #164 and remove bower support
2019-02-27 14:58:24 +11:00
Mike Reinstein
fc90485abd
flip around esm and umd build labels
2019-02-26 19:53:16 -08:00
Mike Reinstein
4b5f628152
update deps
2019-02-26 19:52:40 -08:00
Mike Reinstein
63395381be
copy css to dist/ in the build step
2019-02-26 19:49:42 -08:00
Mike Reinstein
7e4bff84f6
move the built files to dist/
2019-02-26 19:36:29 -08:00
Mike Reinstein
3ce0e6cb2b
add specific build target for esm. add missing semicolon to source. update README with more install vectors
2019-02-22 10:14:41 -08:00
Mike Reinstein
9805f3fc2b
simplify bundling for different environments
2019-02-05 12:03:10 -08:00
Mike Reinstein
7d64b9398e
reduce builds to 2: umd and es module
2019-02-03 17:58:47 -08:00
Mike Reinstein
cdb09ada91
support esm, cjs modules #164 and remove bower support
2019-02-03 17:46:40 -08:00