Skip to content

Conversation

bepuzzled
Copy link
Contributor

@bepuzzled bepuzzled commented Aug 18, 2025

This basic PR intends to improve browsers compliance with user's intent when the widget's draggable attribute is set to no achieved by setting the resulting <a> tag's draggable attribute to false .

Currently, the user's desire to disable drag and drop when creating a <$link widget by specifying attribute draggable="no" does not carry this intent in the resulting HTML <a tag with a matching draggable="false" attribute. Thus browsers still allow the user to drag the link.

PR submitted following the discussion and screen captures at https://talk.tiddlywiki.org/t/question-regarding-the-link-widget-when-its-draggable-attribute-is-set-to-no/13319/4 and associated recommendation for a PR.

Copy link

netlify bot commented Aug 18, 2025

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit e2115d2
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/68a3047c80eac70008580792
😎 Deploy Preview https://deploy-preview-9262--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@bepuzzled It appears that this is your first contribution to the project, welcome.

With apologies for the bureaucracy, please could you prepare a separate PR to the 'tiddlywiki-com' branch with your signature for the Contributor License Agreement (see contributing.md).

Copy link

github-actions bot commented Aug 18, 2025

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2537.6 KB
PR 2537.7 KB

Diff: ⬆️ Increase: +0.1 KB

@ericshulman ericshulman changed the title IMPROVE HANDLING OF $LINK WIDGET'S DRAGGABLE="NO" Improve handling of $link widget's draggable="no" Aug 18, 2025
dragTiddlerFn: function() {return self.to;},
widget: this
});
} else {
Copy link
Member

@pmario pmario Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In TW we use tabs for indentation. So you need to convert the spaces.
There also needs to be an else if(this.draggable === "no") otherwise any draggable parameter will add draggable=false

So draggable="noABC" will also deactivate dragging

indentation changed from spaces to tabs
modified else statement into a else if statement for additional specificity
@pmario
Copy link
Member

pmario commented Aug 18, 2025

Looks good to me now.

Copy link

bepuzzled has signed the Contributor License Agreement (see contributing.md)

@Jermolene
Copy link
Member

Thanks @bepuzzled. This will be merged soon when we start merging v5.4.0 PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants