Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(QKnob): disable dragging on descendant images (fix #17812) #17834

Closed
wants to merge 2 commits into from

Conversation

euphemism
Copy link
Contributor

Fixes #17812

Before

Screen.Recording.2025-02-07.at.8.43.16.AM.mov

After

QKnob-with-image-after.mov

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Documentation
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?
..kind of? Functionally, yes, but practically no.

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the dev branch (or v[X] branch)
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on an Electron app
  • Any necessary documentation has been added or updated in the docs or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to start a new feature discussion first and wait for approval before working on it)

Copy link

github-actions bot commented Feb 15, 2025

UI Tests Results

    1 files     98 suites   38s ⏱️
1 031 tests 1 031 ✅ 0 💤 0 ❌
1 050 runs  1 050 ✅ 0 💤 0 ❌

Results for commit 77f406f.

♻️ This comment has been updated with latest results.

@yusufkandemir
Copy link
Member

yusufkandemir commented Feb 24, 2025

Thanks for the contribution. But, we can't accept this PR due to the reasons I've listed in the issue, which I also added below.

Since it's in the slot, the user is in total control. So, the user can do:

<q-knob
  ...

  <q-avatar size="60px">
    <img draggable="false" src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">
  </q-avatar>
</q-knob>

or

<q-knob
  ...

  <q-avatar size="60px">
    <img class="no-pointer-events" src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">
  </q-avatar>
</q-knob>

Using images is not a really frequent use case, and the solution is not anywhere near being hard, solving this without causing any potential problems to other use cases or preserving the performance is not guaranteed.

So, the proper solution for this would be to document this case in the docs, and possibly integrate it into the example you pointed out as well. For that reason, I'm afraid I will have to deny your PR. But, I'll keep this issue until it gets documented.

Originally posted by @yusufkandemir in #17812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QKnob with image content in default slot can't be interacted with to update model value
2 participants