CEP panel - title attribute line break

Contributor ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

Hi all,

I've noticed that the title attributes of my CEP panel sometimes aren't interpreted correctly. The problem is the line breaks. 
Nothing seems to fix this issues, that, as far as I know, only happens on Windows.

This is what it looks like when hovering over the L button (the same happens on the C E and V buttons):

dbDavideBoscolo_0-1647246140856.png

 

And this is what it should always look like:

dbDavideBoscolo_1-1647246241924.png

 

It's Javascript generated, and this is the code:

function titleAttributes(isWin){
  
  if (isWin){
    $("#div_copy").attr('title', 'Copy<br>+ Ctrl: duplicate<br>+ Alt: mirror');
    $("#div_ease").attr('title', 'Ease<br>+ Shift: in<br>+ Ctrl: mid<br>+ Alt: out<br>+ Shift + Ctrl: in and mid<br>+ Ctrl + Alt: mid and out');
    $("#div_value").attr('title', 'Value<br>+ Ctrl: value and spatial int.');
    $("#div_linearize").attr('title', 'Linearize<br>+ Shift: in<br>+ Ctrl: mid<br>+ Alt: out<br> + Shift + Ctrl: in and mid<br>+ Ctrl + Alt: mid and out');
  }else{
    $("#div_copy").attr('title', "Copy <br> + Opt: duplicate <br> + Command: mirror");
    $("#div_ease").attr('title', "Ease <br> + Shift: in <br> + Opt: mid <br> + Command: out <br> + Shift + Opt: in and mid <br> + Opt + Command: mid and out");
    $("#div_value").attr('title', "Value <br> + Command: value and spatial int.");
    $("#div_linearize").attr('title', "Linearize <br> + Shift: in <br> + Opt: mid <br> + Command: out <br> + Shift + Opt: in and mid <br> + Ctrl + Command: mid and out");
  }
  $("#div_ext").attr('title', 'Toggle between Libraries');
}


Any ideas?

TOPICS
Error or problem , Expressions , Scripting , User interface or workspaces

Views

64

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Mar 14, 2022 Mar 14, 2022
It looks like using \n instead of <br> works fine.

Likes

Translate

Translate
Adobe Community Professional ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

You can use double breaks. That's a common issue even in browsers...

 

Mylenium

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

Hi Mylenium,
do you mean by adding <br> twice? Because it doesn't seem to work.

dbDavideBoscolo_0-1647304461779.png

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

LATEST

It looks like using \n instead of <br> works fine.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines