speced / respec

A tool for creating technical documents and web standards
https://respec.org/
Other
718 stars 389 forks source link

ReSpec intercepting button onclick? #2064

Closed gkellogg closed 5 years ago

gkellogg commented 5 years ago

Important info

Description of problem

The spec uses an "onclick" in buttons used for tabbing in examples (e.g., example 3. The onclick event is not detected for these buttons, although it was recently. Interestingly, if the spec is saved to HTML, the events are triggered, and tabbing works.

The code that does this is inline in the spec here. You can see how it should work in the latest published spec here, or by saving the editors draft and trying there.

gkellogg commented 5 years ago

cc/ @iherman

saschanaz commented 5 years ago

I think #2050 is the culprit. We should only reindent <pre>, not everything in <aside>.

gkellogg commented 5 years ago

I'm still seeing the problem in 24.3.0, has the fix been released? For example, click on tabs in https://w3c.github.io/json-ld-syntax/#example-30-using-vocabularies.

marcoscaceres commented 5 years ago

Confirmed. Reopening.

marcoscaceres commented 5 years ago

Greg, as a temporary work around, would it be possible for you to make the modifications after ReSpec is done? (I.e., using postProcess).

marcoscaceres commented 5 years ago

Note for when we try to fix this: using hyperHTML.bind() on the div should retain the event handler.

saschanaz commented 5 years ago

@marcoscaceres The issue here is that #2082 has not been released yet.

Edit: not 😅

marcoscaceres commented 5 years ago

oh, my bad. I thought I'd released it!!!

marcoscaceres commented 5 years ago

Doing release right now.

marcoscaceres commented 5 years ago

Working, thanks @saschanaz! ☺️