-
Notifications
You must be signed in to change notification settings - Fork 93
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read style type of hyperlinks #296
Comments
I want to work on this issue. Pls assign me this task |
@Arvind644 I think this issue needs some more investigation to see what the problem is, if any. Please look in to it and share your findings and proposed solution here. |
@irmerk the problem here isn't with the link but with the modal pop-up. This can be tested by commenting the code where we show the link modal and then clicking on the link. |
Bug Report 馃悰
We get this error while trying to calculate the style of hyperlinks:
As you can see in this line that we need the value
editor.selection
forcurrentStyleCalculated
which will tell us the type of the current block. It works absolutely great for every single type of text except forhyperlinks
.This issue did not surface beforehand because it was inside a conditional statement which only allowed this calculation to take place if
(editor && editor.selection)
outputted a positive result, as well as the change in style-type was not 'real-time' so it was difficult to catch, see #283 for more details. That is why the style type got defaulted to the string'Style'
whenever this happened.What appears here from some basic testing (logging
!!editor.selection
on console) is that calculating the style of hyperlinks itself is not creating the issue. The error comes up as soon as the pop-up appears.You can see here that the value is truthy at first but when the pop-up appears, it becomes falsy(here: null).
Expected Behavior
We should be able to calculate the style type of link.
editor.selection
should not be undefined when the pop-up menu appears. Also, we should be able to calculate the style of the block where the link is whether it is any of the headings or the paragraph.Possible Solution
Seems like the problem might be being caused by how the pop-up is being rendered.
Steps to Reproduce
Context (Environment)
Desktop
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: