Skip to content

Commit 443c847

Browse files
committed
Respect supports.selector value
1 parent 9e9d9b2 commit 443c847

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

html-api-debugger/interactivity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class="context-html"
152152
<label>Show closers <input type="checkbox" data-wp-bind--checked="state.showClosers" data-wp-on-async--input="handleShowClosersClick"></label>
153153
<label>Show invisible <input type="checkbox" data-wp-bind--checked="state.showInvisible" data-wp-on-async--input="handleShowInvisibleClick"></label>
154154
<span><label>Show virtual <input type="checkbox" data-wp-bind--checked="state.showVirtual" data-wp-on-async--input="handleShowVirtualClick"></label></span>
155-
<div data-wp-bind-hidden="!state.htmlapiResponse.supports.selectors">
155+
<div data-wp-bind--hidden="!state.htmlapiResponse.supports.selectors">
156156
<label>CSS Selectors <textarea placeholder="CSS selector: .my-class" data-wp-on-async--input="handleSelectorChange"><?php echo "\n" . esc_textarea( str_replace( "\0", '', $options['selector'] ?? '' ) ); ?></textarea></label>
157157
</div>
158158
</div>

html-api-debugger/view.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ const store = createStore(NS, {
143143
showInvisible: store.state.showInvisible,
144144
showVirtual: store.state.showVirtual,
145145
hoverInfo: store.state.hoverInfo,
146-
selector: store.state.selector,
146+
selector: store.state.htmlapiResponse.supports.selectors
147+
? store.state.selector
148+
: '',
147149
};
148150
},
149151

0 commit comments

Comments
 (0)