Skip to content

Remove blank lines in browseable message#12005

Merged
michaelDCurran merged 6 commits into
nvaccess:masterfrom
CyrilleB79:noBlankLine
Jan 22, 2021
Merged

Remove blank lines in browseable message#12005
michaelDCurran merged 6 commits into
nvaccess:masterfrom
CyrilleB79:noBlankLine

Conversation

@CyrilleB79

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #12004

Summary of the issue:

When reading a text in a browseable message (such as formatting information) line by line pressing down arrow, there is one blank line between each line of text.

Description of how this pull request fixes the issue:

  • Modified the HTML message template to use only innerHTML attribute and not innerText anymore.
  • The raw text formatting is done in Python code by adding <pre> tag and escaping < character.

Testing performed:

  • Tested with formatting info message, with "Hello world" message in raw text.
  • Tested HTML message with Character information add-on.
  • Tested long raw text (1000000 character) with Clip Contents Designer from @nvdaes and @abdel792.
    Incidentally, this PR also fixes a visual issue in raw text browseable message containing lines longer than the window: moving the cursor on blank lines would pane the whole text to its right-most position, making the beginning of the lines disappear. This was visually strange. This is not the case anymore with this PR since the unexpected blank lines have been removed.

Known issues with pull request:

None.

Change log entry:

Bug fixes!
Formatting information and other browseable messages do not present unexpected blank lines anymore. (#12004)

Comment thread source/ui.py Outdated
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@michaelDCurran, this PR is ready. I have addressed your comments and performed again the teste of the initial description of this PR.

michaelDCurran
michaelDCurran previously approved these changes Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected empty lines in browseable messages (e.g. formatting information)

3 participants