TiddlyWiki5 icon indicating copy to clipboard operation
TiddlyWiki5 copied to clipboard

[BUG] EditTextWidget Produce Unknown Input For Text Field and Tag=Input

Open kookma opened this issue 3 years ago • 0 comments

Describe the bug

The official documentation in https://tiddlywiki.com/#EditTextWidget says:

By default, applying the EditTextWidget to the text field of a tiddler will generates an HTML <textarea> element, i.e. a multi-line editor. Applying the EditTextWidget to any other field generates an HTML <input type="text"> element, a single-line editor. This behavior can be overridden with the tag and type attributes.

So, for

  • <$edit-text tiddler="uu" field="d" /> TW produces

    • <input type="text" value="">
  • <$edit-text tag="input" tiddler="uu" field="d" /> TW produces

    • <input type="text" value="">
  • <$edit-text tiddler=uu field="text" /> TW produces

    • <textarea>Type the text for the tiddler 'uu'</textarea>

So far so good!

BUT

  • <$edit-text tag=input tiddler=uu field="text" /> TW produces
    • <input value="Type the text for the tiddler 'uu'">

no type?

Expected Behavior

  • <$edit-text tag=input tiddler=uu field="text" /> TW produces
    • <input type="text" value="Type the text for the tiddler 'uu'">

We need the input type because without it some CSS will break!

Info

  • TW 5.2.3
  • Chrome 102, Edge 102
  • Windows 10

kookma avatar Aug 11 '22 10:08 kookma