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(addon-editor): focus should trigger only for outside contenteditable area #4471

Merged
merged 1 commit into from
May 17, 2023

Conversation

splincode
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring
  • Build or CI related changes
  • Documentation content changes

What is the current behavior?

@waterplea sorry, but mousedown fixed focus, but now it doesn't respond at all
https://taiga-ui.dev/next/editor/API

image

@lumberjack-bot
Copy link

lumberjack-bot bot commented May 16, 2023

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

@bundlemon
Copy link

bundlemon bot commented May 16, 2023

BundleMon

Unchanged files (6)
Status Path Size Limits
demo/browser/main.(hash).js
324.6KB +10%
demo/browser/vendor.(hash).js
197.37KB +10%
demo/browser/runtime.(hash).js
37.82KB +10%
demo/browser/polyfills.(hash).js
18.28KB +10%
demo/browser/scripts.(hash).js
17.9KB +10%
demo/browser/styles.(hash).css
1.67KB +10%

No change in files bundle size

Unchanged groups (1)
Status Path Size Limits
demo/browser/*..js
2.23MB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2023

Visit the preview URL for this PR (updated for commit 8351946):

https://taiga-ui--pr4471-splincode-fix-editor-v0sdd1h6.web.app

(expires Thu, 18 May 2023 10:30:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4b5ece1e114386f6a105425ef799091475b249eb

@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02 ⚠️

Comparison is base (481c805) 69.83% compared to head (8351946) 69.82%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4471      +/-   ##
==========================================
- Coverage   69.83%   69.82%   -0.02%     
==========================================
  Files        1560     1560              
  Lines       17101    17105       +4     
  Branches     2406     2408       +2     
==========================================
  Hits        11943    11943              
- Misses       4763     4767       +4     
  Partials      395      395              
Flag Coverage Δ
addon-charts 71.41% <ø> (ø)
addon-doc 51.72% <ø> (ø)
addon-editor 49.75% <0.00%> (-0.10%) ⬇️
addon-mobile 62.47% <ø> (ø)
addon-table 61.19% <ø> (ø)
addon-tablebars 98.11% <ø> (ø)
cdk 81.42% <ø> (ø)
core 76.89% <ø> (ø)
kit 72.12% <ø> (ø)
summary 69.82% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...addon-editor/components/editor/editor.component.ts 23.63% <0.00%> (-1.86%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@waterplea
Copy link
Collaborator

It should be like in textfields, only prevent and focus if clicked outside of actual focusable part:
https://github.com/Tinkoff/taiga-ui/blob/main/projects/core/components/primitive-textfield/primitive-textfield.component.ts#L289-L298

@splincode splincode force-pushed the splincode/fix/editor branch 2 times, most recently from 93931f2 to 7b9e8e6 Compare May 16, 2023 18:55
@splincode
Copy link
Member Author

@waterplea fixed

@splincode splincode changed the title fix(addon-editor): use click instead of mousedown.prevent fix(addon-editor): prevent focus if target element is focused May 16, 2023
@splincode splincode changed the title fix(addon-editor): prevent focus if target element is focused fix(addon-editor): prevent focusing if target element is focused May 16, 2023
@splincode splincode force-pushed the splincode/fix/editor branch from 7b9e8e6 to 8351946 Compare May 17, 2023 10:25
@splincode splincode changed the title fix(addon-editor): prevent focusing if target element is focused fix(addon-editor): focus should trigger only for outside contenteditable area May 17, 2023
@splincode splincode requested a review from waterplea May 17, 2023 10:25
@splincode splincode merged commit 6da026e into main May 17, 2023
@splincode splincode deleted the splincode/fix/editor branch May 17, 2023 13:09
@well-done-bot
Copy link

well-done-bot bot commented May 17, 2023

'Well done'

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

Successfully merging this pull request may close these issues.

2 participants