Prosemirror whitespace behaves different browser based

I am work around with track change requirement, I have one issue white space if user delete after white space they behave different in chrome browser if i work around firefox it working,I think the major issue white-space:‘pre-wrap’ how can i use in the nytimes -prosemirror The functionality worked in firefox but it make issue in chrome related browser

chrome view screen-capture.webm

Firebox view screen-recorder-tue-sep-10-2024-13-11-52.webm

I am trying apply this css it won’t be worked

.ProseMirror { border: 2px solid #00008b; border-radius: 0.25rem; padding: 1rem; outline: none; font-family: Arial; font-weight: 500; font-size: 18px; display: block; word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; }

.ProseMirror pre { white-space: pre-wrap; }

This my code GitHub - gokulramdev/prosemirror-trackchanges

@marijn

I cannot access those videos. But regardless of that, I much prefer descriptions of behavior you’re seeing in words, rather than having to try and figure out what you mean from a screen capture. What, precisely, is the difference in behavior you’re seeing?

I am deleting threw backspace while after deleting I am adding same text replaceit add in editor after space deletion the transcation steps return different type from and to number in chrome browser and wrapping deleting text is causing probelm I attached github repo above it.The transaction that prosemirror-view generates is different in Chrome vs Firefox, but I can’t say why. In Firefox, it creates a step that replaces the “r” character with “” (empty). In Chrome, it creates a step that replaces “r editor!” with " editor!". This reference image in chrome but works in firefox

@marijn

Could you try to set up a (minimal, simplified) script that allows me to reproduce this?

I tried with simple it’s working

I find difficulty to resolve it , If am using prosemirror-view 1.23.5` wroking fine but I am using lastest version while deleting the backspace it return an step with different from and to values, can you gave me suggestion to fix this realted issues

when trying load the css the warning this how to load this css

ProseMirror expects the CSS white-space property to be set, preferably to ‘pre-wrap’. It is recommended to load style/prosemirror.css from the prosemirror-view package.

@marijn