jsoneditor/examples
Josh Kelley 69fbe63f0e
Multi-select mouse events now honor the event's window (#1098)
* Multi-select mouse events now honor the event's window

This prevents errors from opening JSONEditor in a child window (such as `window.open` or third-party libraries like react-new-window).

* Add a demo of showing a JSONEditor in a child window

* Minor spelling fixes

* Further improvements to new window support

Use `event.view` instead of the global `window`. Copy VanillaPicker styles in the example so that the color picker is correctly styled.

* Add 'noopener'

This helps security; otherwise, JavaScript running in the context of the new window can access the original window object via the `window.opener` property, even if it's a different origin.

* Update modal handling for new windows

There are two approaches we could take; we could use the existing modalAnchor property and make callers responsible for setting it, or we could modify the default handling to default to the node's container body. For now, I chose to make callers responsible.

Rename showTransformModal's `anchor` parameter to `container`; as far as I can tell, `anchor` didn't work properly.
2020-09-23 10:06:12 +02:00
..
css Updated darktheme example 2015-12-31 13:35:10 +01:00
react_advanced_demo Make React examples maintenance friendly 2020-07-04 15:06:15 +02:00
react_demo Make React examples maintenance friendly 2020-07-04 15:06:15 +02:00
requirejs_demo Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
01_basic_usage.html Multi-select mouse events now honor the event's window (#1098) 2020-09-23 10:06:12 +02:00
02_viewer.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
03_switch_mode.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
04_load_and_save.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
05_custom_fields_editable.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
06_custom_styling.html Default to tree mode in custom styling example 2020-09-09 09:05:04 +02:00
07_json_schema_validation.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
08_custom_ace.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
09_readonly_text_mode.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
10_templates.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
11_autocomplete_basic.html Remove test options from example again (see #850) 2019-12-01 11:56:22 +01:00
12_autocomplete_dynamic.html Some fixes and updates in examples 2019-09-01 16:37:57 +02:00
13_autocomplete_advanced.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
14_translate.html Publish v8.3.0 2020-01-18 14:26:28 +01:00
15_selection_api.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
16_synchronize_editors.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
17_on_event_api.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
18_custom_validation.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
19_custom_validation_async.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
20_custom_css_style_for_nodes.html Update example 20 to also show how to customize font color (See #990) 2020-05-23 14:26:29 +02:00
21_customize_context_menu.html Rewrite code styling of browser examples 2019-08-29 15:45:32 +02:00
22_on_validation_event.html onValidationError to report any kind of error (#861) 2019-12-08 10:35:22 +01:00
23_custom_query_language.html Improve projection in example to flatten picking a single field 2020-01-04 12:24:12 +01:00
24_new_window.html Multi-select mouse events now honor the event's window (#1098) 2020-09-23 10:06:12 +02:00