Description: While typing a formula, if you click on a visual element i.e. a fraction, the fraction is inserted in the formula in the wrong place instead of the cursor's current position. Steps to Reproduce: 1. start typing a formula 2. click on a visual element (i.e. a fraction) Actual Results: 3. The visual element you clicked is inserted at the beginning of the formula an not at the current cursor's position Expected Results: The visual element you clicked should be inserted at the current cursor's position (as it was happening prior to 24.x.x version) Reproducible: Always User Profile Reset: Yes Additional Info: Version: 24.2.1.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: el-GR (en_US.UTF-8); UI: en-US Ubuntu package version: 4:24.2.1~rc2-0ubuntu0.22.04.1~lo1 Calc: threaded
Created attachment 193137 [details] Using Libre Math's visual elements destroys formula structure
Confirmed. The element insertion does not track the Visual mode cursor, and resulting node is misplaced. Version: 24.2.1.2 (X86_64) / LibreOffice Community Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded You can revert to non-visual command input window. Done from Tools -> Options -> LibreOffice Math -> Settings panel. Uncheck the now default 'Enable Visual Editing'
(In reply to V Stuart Foote from comment #2) > Confirmed. The element insertion does not track the Visual mode cursor, and > resulting node is misplaced. > > Version: 24.2.1.2 (X86_64) / LibreOffice Community > Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac > CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: > win > Locale: en-US (en_US); UI: en-US > Calc: CL threaded > > You can revert to non-visual command input window. Done from Tools -> > Options -> LibreOffice Math -> Settings panel. Uncheck the now default > 'Enable Visual Editing' thank you for this workaround. I now realize that using this "visual mode" I can type inside the "visual" window, which works fine. But if I use the "latex" editor and then click on visual element then it is misplaced.
No repro in 7.6 with experimental mode turned on: Version: 7.6.5.2 (X86_64) / LibreOffice Community Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded Reproduced in 24.2.1: Version: 24.2.1.1 (X86_64) / LibreOffice Community Build ID: 359ef544e625d2ffbfced462ab37bd593ca85fa7 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded So it's a regression.
As I understand it, this was done on purpose with: commit ee187f6ed7873f3ebc1f845a4384a84713be1e9c author Khaled Hosny Tue Sep 05 20:24:13 2023 +0300 committer خالد حسني Tue Sep 05 20:28:34 2023 +0200 starmath: Always insert using SmCursor when inline editing is enabled Choosing which code path based on which widget has focus is not a very good idea, and leads to unreliable UI tests as each code path inserts the text slightly differently (one code path inserts plain text then parses the whole equation again, while the other parses the new text then inserts the parsed node directly). Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156578 Khaled, any chance this could be handled better? I assume more users than us 3 will perceive this as a bug. Jumping between visual and syntax editing with the help of the Elements sidebar is to be expected, in my opinion.
Seems the cursor does not follow textual input. If you enter content in the document the elements are inserted at the cursor position. => bug
At this point I think we should flip the default back to disable visual editing. It seems to be more trouble than it is worth it without someone invested in fixing these issues. I don’t have a working LO build setup, though, so someone else has to do it.
Thanks, Khaled. Xisco, what do you think? - 2d47c824cd31294899fa24989b3d7bd4f98dcdee: Visual mode made default + option to turn it off, in which Khaled did note: "If it turns to be a disaster, we can flip the option and disable it by default." - ee187f6ed7873f3ebc1f845a4384a84713be1e9c: Always insert using SmCursor. Instead of reverting everything, we can default to Visual mode off but keep it out of experimental, and this report can stay open.
(In reply to Stéphane Guillou (stragu) from comment #8) > ... > Instead of reverting everything, we can default to Visual mode off but keep > it out of experimental, and this report can stay open. +1, reasonable to keep it graduated but not as default mode (using the new checkbox on Tools -> Options -> LO Math -> Settings). And Visual mode still needs a lot of documentation effort as for bug 159989 which until then likely will result in more avoidable issues being reported.
*** Bug 161471 has been marked as a duplicate of this bug. ***
*** Bug 161506 has been marked as a duplicate of this bug. ***
*** Bug 162390 has been marked as a duplicate of this bug. ***
*** Bug 162515 has been marked as a duplicate of this bug. ***
Switching this option on or off is a good idea, but it should be possible also in LO Writer where LO Math can be used.
(In reply to Pit Hauge from comment #14) > Switching this option on or off is a good idea, but it should be possible > also in LO Writer where LO Math can be used. Not the best idea. In Writer when an OLE formula has been/or is being inserted--while the OLE exposes the full sm Math module Formula UI the module with focus is still Writer. Such that Tools -> Options comes up on the Writer configuration, not the sm LibreOffice Math option panels. So user can't get to the Settings -> 'Enable visual editing' checkbox while in a Writer module. That and there are other sm formula editor configurations that should probably not be available while not fully working in the Math module. It would be nice to record a org.openoffice.Office.Math/Misc stanza into user Profile, and support a cross module edit from Tools -> Options -> Advanced -> Expert Configuration. But urgency will fade when/if the Visual mode is reverted to no longer be default.
*** Bug 161532 has been marked as a duplicate of this bug. ***
https://gerrit.libreoffice.org/c/core/+/172241 switches the option off by default. But I wonder if this is rather a band-aid than a solution for this issue.
(In reply to V Stuart Foote from comment #15) > ... > It would be nice to record a org.openoffice.Office.Math/Misc stanza into > user Profile, and support a cross module edit from Tools -> Options -> > Advanced -> Expert Configuration. > ... Oops, missed that stanza is already there 'InlineEditEnable', available to modify in User profile (registrymodifications.xcu) or search in Expert Configuration. But at 25.2.0 will again be set disabled by default. @Heiko, will you be backporting to 24.8.1/8.2? And maybe also 24.6.2?
(In reply to Heiko Tietze from comment #17) >... But I wonder if this is rather a band-aid than a solution for this > issue. Definitely! The sm Visual editor (aka "in-line" sm editing mode) has needed work for a long time since introduced [1]. Khaled poked at it during his last active stint but still a lot to be done, likewise for sm in general dating back to its beginnings at StarOffice 5 [2]. We'd kept it suppressed as Experimental, Khaled brought it out and set it default at 24.2.0 for better exposure--maybe not the best results. =-ref-= [1] https://opengrok.libreoffice.org/history/core/starmath/visual-editor-todo [2] https://www.mail-archive.com/dev@sw.openoffice.org/msg00200.html
Heiko Tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/cd2eba5c698081355d51c491398119f38068bfb2 Related tdf#160226 - Math inline editing Off by default It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Not fixed... just off by.
*** Bug 162721 has been marked as a duplicate of this bug. ***
Heiko Tietze committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/149ca1e0a8123b8722ecb74f6f5e8e5080ce6052 Related tdf#160226 - Math inline editing Off by default It will be available in 24.8.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Heiko Tietze committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/ca43a2434520338224b9d3dacc45af242fe5ad55 Related tdf#160226 - Math inline editing Off by default It will be available in 24.2.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Heiko Tietze committed a patch related to this issue. It has been pushed to "libreoffice-24-8-1": https://git.libreoffice.org/core/commit/c4f69dd0896223a8f9350443df658cc9cb9b5e3f Related tdf#160226 - Math inline editing Off by default It will be available in 24.8.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 162947 has been marked as a duplicate of this bug. ***