kopia lustrzana https://github.com/wagtail/wagtail
Removed preventDefault from openPreviewInNewTab in PreviewController
Relates to #10356pull/12379/head
rodzic
825a77d6c2
commit
b0c90d4be2
|
@ -37,6 +37,7 @@ Changelog
|
|||
* Maintenance: Remove defunct oEmbed providers (Rahul Samant)
|
||||
* Maintenance: Remove obsolete non-upsert-based code for Postgres search indexing (Jake Howard)
|
||||
* Maintenance: Remove unused Rangy JS library (LB (Ben) Johnston)
|
||||
* Maintenance: Update `PreviewController` usage to leverage Stimulus actions instead of calling `preventDefault` manually (Ayaan Qadri)
|
||||
|
||||
|
||||
6.3 LTS (01.11.2024)
|
||||
|
|
|
@ -163,7 +163,7 @@ describe('PreviewController', () => {
|
|||
<a
|
||||
href="/admin/pages/1/edit/preview/"
|
||||
data-w-preview-target="newTab"
|
||||
data-action="w-preview#openPreviewInNewTab"
|
||||
data-action="w-preview#openPreviewInNewTab:prevent"
|
||||
>
|
||||
Preview in new tab
|
||||
</a>
|
||||
|
|
|
@ -803,7 +803,6 @@ export class PreviewController extends Controller<HTMLElement> {
|
|||
* @returns whether the data is valid
|
||||
*/
|
||||
async openPreviewInNewTab(event: MouseEvent) {
|
||||
event.preventDefault();
|
||||
const link = event.currentTarget as HTMLAnchorElement;
|
||||
|
||||
const valid = await this.setPreviewDataWithAlert();
|
||||
|
|
|
@ -57,6 +57,7 @@ depth: 1
|
|||
* Remove defunct oEmbed providers (Rahul Samant)
|
||||
* Remove obsolete non-upsert-based code for Postgres search indexing (Jake Howard)
|
||||
* Remove unused Rangy JS library (LB (Ben) Johnston)
|
||||
* Update `PreviewController` usage to leverage Stimulus actions instead of calling `preventDefault` manually (Ayaan Qadri)
|
||||
|
||||
|
||||
## Upgrade considerations - changes affecting all projects
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block new_tab_button %}
|
||||
<a href="{{ preview_url }}?mode={{ object.default_preview_mode|urlencode }}" target="_blank" rel="noreferrer" class="w-preview__size-button" data-w-preview-target="newTab" data-action="w-preview#openPreviewInNewTab" aria-label="{% trans 'Preview in new tab' %}">{% icon name="link-external" %}</a>
|
||||
<a href="{{ preview_url }}?mode={{ object.default_preview_mode|urlencode }}" target="_blank" rel="noreferrer" class="w-preview__size-button" data-w-preview-target="newTab" data-action="w-preview#openPreviewInNewTab:prevent" aria-label="{% trans 'Preview in new tab' %}">{% icon name="link-external" %}</a>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue