Css elements not working as expected

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Srinarayan
Posts: 42
Joined: Tue Jun 08, 2021 3:27 pm

Css elements not working as expected

Post by Srinarayan »

Hi Team,

We have an issue in our css file where we are trying to display some content with a hyperlink. We observed that the element "link" is preventing documents from being displayed.

Below is our code:

Code: Select all

 
 content: "Hyperlink Text"  !important ;
 link: attr(someUrl);
when we remove the link element completely from css then only the content is being loaded and the content is also being displayed. Please look into this issue.

Regards,
Srinarayan
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Css elements not working as expected

Post by chrispitude »

Srinarayan wrote: Thu Feb 03, 2022 3:20 pmWe have an issue in our css file where we are trying to display some content with a hyperlink. We observed that the element "link" is preventing documents from being displayed.
Hi Srinarayan,

Can you clarify what you mean by "preventing documents from being displayed"?

Also, which transformation type are you using?

- Chris
Srinarayan
Posts: 42
Joined: Tue Jun 08, 2021 3:27 pm

Re: Css elements not working as expected

Post by Srinarayan »

Hi Chris,

Let me give you little more background first. In oxygen web author 22.1 the link element in the CSS works fine. But in the 23.1.1 Web author version the link element is stopping the documents to be loaded. The error which we got is "Document could not be loaded. Details:
Cannot read properties of null (reading 'dataset') "
.

Was there any changes done to the link element function in 23.1.1 when compared to 22.1? and Is there any other way with which we can display some content with a link embedded in it?

Regards,
Srinarayan.
cristi_talau
Posts: 496
Joined: Thu Sep 04, 2014 4:22 pm

Re: Css elements not working as expected

Post by cristi_talau »

Hello,
In version 23.0 we added support to customize the behavior of links on click [1]. We added a new CSS property: -oxy-link-activation-trigger , but we are not aware of any breaking changes.
Can you help us reproduce the error by giving us a small XML file with an associated CSS that trigger the error you observed? You can also use our technical support form if you want to share it privately: https://www.oxygenxml.com/techSupport.html .
Best,
Cristian

[1] https://www.oxygenxml.com/xml_web_autho ... 3.0.0.html
[2] https://www.oxygenxml.com/doc/versions/ ... igger.html
Srinarayan
Posts: 42
Joined: Tue Jun 08, 2021 3:27 pm

Re: Css elements not working as expected

Post by Srinarayan »

Hi Cristian,

Hereby attaching a small XML code along with the CSS snippet with which we are having an issue with. Please look into it.

Regards,
Srinarayan
oxygen-ticket.zip
(586 Bytes) Downloaded 153 times
cristi_talau
Posts: 496
Joined: Thu Sep 04, 2014 4:22 pm

Re: Css elements not working as expected

Post by cristi_talau »

Hello,
Thanks for helping us reproduce the problem. This problems happen where there is a PI after the root of the document that has an associated link. It will be fixed in the next Web Author release v24.1.
To work around this issue in Web Author 23.1.1, you can add the following code in a plugin, or in the "app/plugin.js" file of inside Web Author.

Code: Select all

(function (){
  goog.dom.dataset.has = function (element, key) {
    return element && key in element.dataset;
  };
})();
Best,
Cristian
Srinarayan
Posts: 42
Joined: Tue Jun 08, 2021 3:27 pm

Re: Css elements not working as expected

Post by Srinarayan »

Hi Cristian,

I have added the function in one of our plugins and its working now.

Thank you.

Regards,
Srinarayan
Post Reply