Dialog Polyfill Versions Save

Polyfill for the HTML dialog element

0.4.6

7 years ago
  • Moves to MutationObserver and improves catching dialog removals (while continuing to support mutation events for IE10 and below)
  • Detects invalid placements of modal dialogs (within a stacking context), warning the user with console.warn, and tries to allow use anyway
  • Downgrades dialogs that are moved within a page (modal => normal), matching Chrome
  • Fixes an issue where focus was performed before a dialog was shown
  • Fixes an issue where inner non-modal dialogs were unfocusable

0.4.5

7 years ago
  • Removes leftover debug messages and additional listener.

0.4.4

7 years ago
  • Focuses on show as well as showModal
  • Removed warning from registerDialog where native support exists (forceRegisterDialog will still make loud noise)

0.4.3

8 years ago

Fixes issues-

  • Adds a default role to each dialog if unspecified: #63
  • Throw Error objects, instead of strings, on errors: #83
  • Allow unlabeled forms: #77
  • IE9/10 focus fix: #87
  • Support CommonJS and AMD: #84

0.4.2

8 years ago

Fixes minor issues-

  • Supports forms inside dialogs without method
  • activeElement element blur sanity-check for IE
  • Fix center alignment if dialog is taller than viewport

0.4.1

8 years ago

This is a tiny update just to match NPM's published 0.4.1 version.

0.4.0

8 years ago

Since the last release, some highlights-

  • Test suites
  • The open attribute and other state calls use the same backing value
    • open is observed by the browser
  • Better support for <form method="dialog"> and setting returnValue
  • More stable class-based rewrite
  • Limit to number of open modal dialogs
  • Simplified focus blocking
  • Other minor updates to match the W3C spec
    • Default CSS updates for small-screen browsers

Additionally, note that dialogPolyfill.registerDialog is now a noop on browsers with dialog support, such as Chrome. If you'd like to force use of the polyfill (with unpredictable results), please call dialogPolyfill.forceRegisterDialog.

There are still some unresolved issues in IE9/10. We'd appreciate user feedback.

0.3.0

9 years ago