Ticket #272 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

Text>>selectionString in Firefox converts newlines to spaces

Reported by: fbo Owned by:
Priority: major Milestone:
Component: Text Keywords:
Cc:

Description (last modified by fbo) (diff)

Firefox correctly sets the selection with setSelectionRange. If you then ask for the selected string using selectionString, it returns the string with all \ns turned into spaces.

Chrome does it right.

More detail:  http://lively-kernel.org/repository/webwerkstatt/users/fbo/modifySelectedLines.xhtml

Ideas: Quick and dirty: selectionString has to check if the current selection string from firefox (window>>getSelection()...toString() <--- i guess this is the actual problem, this FF primitive seems to convert the newlines) is a substring of the text morph's textString. If not, make it match.

Change History

comment:1 Changed 4 months ago by fbo

  • Description modified (diff)

comment:2 Changed 4 months ago by fbo

  • Description modified (diff)

comment:3 Changed 4 months ago by fbo

  • Status changed from new to closed
  • Resolution set to fixed

Quick fix worked.

Note: See TracTickets for help on using tickets.