-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Link Dialog's position appears randomly generated #3224
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3224 +/- ##
==========================================
- Coverage 31.36% 31.29% -0.07%
==========================================
Files 223 227 +4
Lines 6393 6496 +103
Branches 1136 1160 +24
==========================================
+ Hits 2005 2033 +28
- Misses 3685 3739 +54
- Partials 703 724 +21
Continue to review full report at Codecov.
|
Not sure if this is the best approach... it might make more sense to move the positioning styles to the An alternative would be to add the current node's (within Editable) position to redux global state, although this could be costly as arrowing through a block's text would cause a lot to re-render (I believe its only fired on word or format change though). One thing still broken is links within a table block, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Fix, Left a minor comment but this work great
blocks/editable/index.js
Outdated
@@ -709,6 +709,7 @@ export default class Editable extends Component { | |||
{ MultilineTag ? <MultilineTag>{ placeholder }</MultilineTag> : placeholder } | |||
</Tagname> | |||
} | |||
{ focus && <Slot name="Formatting.LinkDialog" /> } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename the slot. I think it's meaning should be something related to its position and not what's inside it. Maybe something like Editable
or Editable.Siblings
Description
fixes: #3211
Moving the FormatToolbar out of the block caused the LinkDialog's offsetParent to be incorrect.
How Has This Been Tested?
Manual browser testing
Screenshots (jpeg or gifs if applicable):
Types of changes
Bug fix
Checklist: