Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.0-r2 does not work in Moodle 4.1 #31

Open
Rhywden opened this issue Nov 28, 2022 · 7 comments
Open

v4.0-r2 does not work in Moodle 4.1 #31

Rhywden opened this issue Nov 28, 2022 · 7 comments

Comments

@Rhywden
Copy link

Rhywden commented Nov 28, 2022

I configured a number of CSS styles and passed valid JSON into the configuration textbox, strictly according to the instructions. This JSON worked under Moodle 3.x

With version 4.0-r2 I'm getting this the moment I try to set a style to a paragraph of text:

image

@Urpokarhu1
Copy link

I would like to see Moodle 4.1 support

@abias
Copy link
Member

abias commented Apr 24, 2023

Hi @Rhywden ,

I am sorry that you encounter this issue.
I have seen a similar error before on Safari/Mac.

Could you please let us know which JSON code you are using and if you see this error in all browsers or just a particular browser?

Thanks,
Alex

@sb-idea
Copy link

sb-idea commented May 11, 2023

Hi,

We have the same issue
We have saved our styles in the atto editor
In the HTML editor: when we try to select a style, the dropdown menu does not disappear and the registration is impossible.
we have errors in the console:

bug_atto_console

When parsing the page elements, the table of values doesn't seem to be well initialized with our new entries, it only considers the first entry "no style" (date_index 0)
We see this error in all browsers

Have you found a solution to this problem?

Thanks a lot for your help

Sophie

@danowar2k
Copy link
Contributor

danowar2k commented Nov 22, 2024

Having the same problem as the OP in Moodle 4.1.13 using atto_styles v4.1-r3 (r4 would not change anything in js code).

Here it is copied in text form (2 parts, both of which are repeated multiple times):

first.js:68 Uncaught RangeError: Maximum call stack size exceeded.
    at attemptFocus (first.js:68:1729)
    at first.js:68:930
    at Array.some (<anonymous>)
    at focusFirstDescendant (first.js:68:906)
    at HTMLDocument.lockHandler (first.js:68:564)
    at WrappedSelection.addRange (yui_combo.php?3.17.2/datatype-xml-parse/datatype-xml-parse.js&3.17.2/io-xdr/io-xdr.js&3.17.2/io-form/io-form.js&3.17.2/io-upload-iframe/io-upload-iframe.js&3.17.2/queue-promote/queue-promote.js&3.17.2/io-queue/io-queue.js&3.17.2/event-mousewheel/event-mousewheel.js&3.17.2/event-resize/event-resize.js&3.17.2/event-hover/event-hover.js&3.17.2/event-touch/event-touch.js&3.17.2/event-move/event-move.js&3.17.2/event-flick/event-flick.js&3.17.2/event-valuechange/event-valuechange.js&3.17.2/event-tap/event-tap.js&3.17.2/event-simulate/event-simulate.js&3.17.2/node-event-html5/node-event-html5.js&3.17.2/async-queue/async-queue.js&3.17.2/gesture-simulate/gesture-simulate.js&3.17.2/node-event-simulate/node-event-simulate.js&m/1732089927/core/notification/notification-confirm-debug.js&m/1732089927/editor_atto/rangy/rangy-debug.js&3.17.2/handlebars-base/handlebars-base.js&3.17.2/handlebars-compiler/handlebars-compiler.js&m/1732089927/core/handlebars/handlebars-debug.js:9790:54)
    at api.createCoreModule.selProto.setRanges (yui_combo.php?3.17.2/datatype-xml-parse/datatype-xml-parse.js&3.17.2/io-xdr/io-xdr.js&3.17.2/io-form/io-form.js&3.17.2/io-upload-iframe/io-upload-iframe.js&3.17.2/queue-promote/queue-promote.js&3.17.2/io-queue/io-queue.js&3.17.2/event-mousewheel/event-mousewheel.js&3.17.2/event-resize/event-resize.js&3.17.2/event-hover/event-hover.js&3.17.2/event-touch/event-touch.js&3.17.2/event-move/event-move.js&3.17.2/event-flick/event-flick.js&3.17.2/event-valuechange/event-valuechange.js&3.17.2/event-tap/event-tap.js&3.17.2/event-simulate/event-simulate.js&3.17.2/node-event-html5/node-event-html5.js&3.17.2/async-queue/async-queue.js&3.17.2/gesture-simulate/gesture-simulate.js&3.17.2/node-event-simulate/node-event-simulate.js&m/1732089927/core/notification/notification-confirm-debug.js&m/1732089927/editor_atto/rangy/rangy-debug.js&3.17.2/handlebars-base/handlebars-base.js&3.17.2/handlebars-compiler/handlebars-compiler.js&m/1732089927/core/handlebars/handlebars-debug.js:9836:30)
    at Editor.setSelection (yui_combo.php?3.17.2/timers/timers.js&3.17.2/querystring-stringify/querystring-stringify.js&m/1732089927/editor_atto/editor/editor-debug.js&m/1732089927/editor_atto/menu/menu-debug.js&m/1732089927/editor_atto/plugin/plugin-debug.js&m/1732089927/atto_collapse/button/button-debug.js&m/1732089927/atto_title/button/button-debug.js&m/1732089927/atto_bold/button/button-debug.js&m/1732089927/atto_italic/button/button-debug.js&m/1732089927/atto_styles/button/button-debug.js&m/1732089927/atto_unorderedlist/button/button-debug.js&m/1732089927/atto_orderedlist/button/button-debug.js&m/1732089927/atto_link/button/button-debug.js&m/1732089927/atto_image/button/button-debug.js&m/1732089927/atto_media/button/button-debug.js&m/1732089927/atto_managefiles/button/button-debug.js&m/1732089927/atto_helixatto/button/button-debug.js&m/1732089927/atto_underline/button/button-debug.js&m/1732089927/atto_strike/button/button-debug.js&m/1732089927/atto_subscript/button/button-debug.js:3265:19)
    at Editor.restoreSelection (yui_combo.php?3.17.2/timers/timers.js&3.17.2/querystring-stringify/querystring-stringify.js&m/1732089927/editor_atto/editor/editor-debug.js&m/1732089927/editor_atto/menu/menu-debug.js&m/1732089927/editor_atto/plugin/plugin-debug.js&m/1732089927/atto_collapse/button/button-debug.js&m/1732089927/atto_title/button/button-debug.js&m/1732089927/atto_bold/button/button-debug.js&m/1732089927/atto_italic/button/button-debug.js&m/1732089927/atto_styles/button/button-debug.js&m/1732089927/atto_unorderedlist/button/button-debug.js&m/1732089927/atto_orderedlist/button/button-debug.js&m/1732089927/atto_link/button/button-debug.js&m/1732089927/atto_image/button/button-debug.js&m/1732089927/atto_media/button/button-debug.js&m/1732089927/atto_managefiles/button/button-debug.js&m/1732089927/atto_helixatto/button/button-debug.js&m/1732089927/atto_underline/button/button-debug.js&m/1732089927/atto_strike/button/button-debug.js&m/1732089927/atto_subscript/button/button-debug.js:3064:22)
    at Object._notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13680:35)
yui_combo.php?3.17.2/datatype-xml-parse/datatype-xml-parse.js&3.17.2/io-xdr/io-xdr.js&3.17.2/io-form/io-form.js&3.17.2/io-upload-iframe/io-upload-iframe.js&3.17.2/queue-promote/queue-promote.js&3.17.2/io-queue/io-queue.js&3.17.2/event-mousewheel/event-mousewheel.js&3.17.2/event-resize/event-resize.js&3.17.2/event-hover/event-hover.js&3.17.2/event-touch/event-touch.js&3.17.2/event-move/event-move.js&3.17.2/event-flick/event-flick.js&3.17.2/event-valuechange/event-valuechange.js&3.17.2/event-tap/event-tap.js&3.17.2/event-simulate/event-simulate.js&3.17.2/node-event-html5/node-event-html5.js&3.17.2/async-queue/async-queue.js&3.17.2/gesture-simulate/gesture-simulate.js&3.17.2/node-event-simulate/node-event-simulate.js&m/1732089927/core/notification/notification-confirm-debug.js&m/1732089927/editor_atto/rangy/rangy-debug.js&3.17.2/handlebars-base/handlebars-base.js&3.17.2/handlebars-compiler/handlebars-compiler.js&m/1732089927/core/handlebars/handlebars-debug.js:9790 Uncaught RangeError: Maximum call stack size exceeded.
    at WrappedSelection.addRange (yui_combo.php?3.17.2/datatype-xml-parse/datatype-xml-parse.js&3.17.2/io-xdr/io-xdr.js&3.17.2/io-form/io-form.js&3.17.2/io-upload-iframe/io-upload-iframe.js&3.17.2/queue-promote/queue-promote.js&3.17.2/io-queue/io-queue.js&3.17.2/event-mousewheel/event-mousewheel.js&3.17.2/event-resize/event-resize.js&3.17.2/event-hover/event-hover.js&3.17.2/event-touch/event-touch.js&3.17.2/event-move/event-move.js&3.17.2/event-flick/event-flick.js&3.17.2/event-valuechange/event-valuechange.js&3.17.2/event-tap/event-tap.js&3.17.2/event-simulate/event-simulate.js&3.17.2/node-event-html5/node-event-html5.js&3.17.2/async-queue/async-queue.js&3.17.2/gesture-simulate/gesture-simulate.js&3.17.2/node-event-simulate/node-event-simulate.js&m/1732089927/core/notification/notification-confirm-debug.js&m/1732089927/editor_atto/rangy/rangy-debug.js&3.17.2/handlebars-base/handlebars-base.js&3.17.2/handlebars-compiler/handlebars-compiler.js&m/1732089927/core/handlebars/handlebars-debug.js:9790:54)
    at api.createCoreModule.selProto.setRanges (yui_combo.php?3.17.2/datatype-xml-parse/datatype-xml-parse.js&3.17.2/io-xdr/io-xdr.js&3.17.2/io-form/io-form.js&3.17.2/io-upload-iframe/io-upload-iframe.js&3.17.2/queue-promote/queue-promote.js&3.17.2/io-queue/io-queue.js&3.17.2/event-mousewheel/event-mousewheel.js&3.17.2/event-resize/event-resize.js&3.17.2/event-hover/event-hover.js&3.17.2/event-touch/event-touch.js&3.17.2/event-move/event-move.js&3.17.2/event-flick/event-flick.js&3.17.2/event-valuechange/event-valuechange.js&3.17.2/event-tap/event-tap.js&3.17.2/event-simulate/event-simulate.js&3.17.2/node-event-html5/node-event-html5.js&3.17.2/async-queue/async-queue.js&3.17.2/gesture-simulate/gesture-simulate.js&3.17.2/node-event-simulate/node-event-simulate.js&m/1732089927/core/notification/notification-confirm-debug.js&m/1732089927/editor_atto/rangy/rangy-debug.js&3.17.2/handlebars-base/handlebars-base.js&3.17.2/handlebars-compiler/handlebars-compiler.js&m/1732089927/core/handlebars/handlebars-debug.js:9836:30)
    at Editor.setSelection (yui_combo.php?3.17.2/timers/timers.js&3.17.2/querystring-stringify/querystring-stringify.js&m/1732089927/editor_atto/editor/editor-debug.js&m/1732089927/editor_atto/menu/menu-debug.js&m/1732089927/editor_atto/plugin/plugin-debug.js&m/1732089927/atto_collapse/button/button-debug.js&m/1732089927/atto_title/button/button-debug.js&m/1732089927/atto_bold/button/button-debug.js&m/1732089927/atto_italic/button/button-debug.js&m/1732089927/atto_styles/button/button-debug.js&m/1732089927/atto_unorderedlist/button/button-debug.js&m/1732089927/atto_orderedlist/button/button-debug.js&m/1732089927/atto_link/button/button-debug.js&m/1732089927/atto_image/button/button-debug.js&m/1732089927/atto_media/button/button-debug.js&m/1732089927/atto_managefiles/button/button-debug.js&m/1732089927/atto_helixatto/button/button-debug.js&m/1732089927/atto_underline/button/button-debug.js&m/1732089927/atto_strike/button/button-debug.js&m/1732089927/atto_subscript/button/button-debug.js:3265:19)
    at Editor.restoreSelection (yui_combo.php?3.17.2/timers/timers.js&3.17.2/querystring-stringify/querystring-stringify.js&m/1732089927/editor_atto/editor/editor-debug.js&m/1732089927/editor_atto/menu/menu-debug.js&m/1732089927/editor_atto/plugin/plugin-debug.js&m/1732089927/atto_collapse/button/button-debug.js&m/1732089927/atto_title/button/button-debug.js&m/1732089927/atto_bold/button/button-debug.js&m/1732089927/atto_italic/button/button-debug.js&m/1732089927/atto_styles/button/button-debug.js&m/1732089927/atto_unorderedlist/button/button-debug.js&m/1732089927/atto_orderedlist/button/button-debug.js&m/1732089927/atto_link/button/button-debug.js&m/1732089927/atto_image/button/button-debug.js&m/1732089927/atto_media/button/button-debug.js&m/1732089927/atto_managefiles/button/button-debug.js&m/1732089927/atto_helixatto/button/button-debug.js&m/1732089927/atto_underline/button/button-debug.js&m/1732089927/atto_strike/button/button-debug.js&m/1732089927/atto_subscript/button/button-debug.js:3064:22)
    at Object._notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13680:35)
    at Object.notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13709:24)
    at Object._notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13372:17)
    at Object._procSubs (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13498:36)
    at Object.fireSimple (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13465:18)
    at Object._fire (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13447:29)

It happens after you mark text (even short text) and use both a defined block or an inline style on it.

It happens even if you open the styles dropdown and then just close it without clicking on even "nostyle". So by clicking outside the dropdown so that it just closes.

@danowar2k
Copy link
Contributor

danowar2k commented Nov 22, 2024

Can we change the issue title to

[v4.0-r2] [v4.1-r4] [Moodle 4.1.13] JS errors when closing the styles dropdown by clicking outside the input
?

@danowar2k
Copy link
Contributor

danowar2k commented Nov 22, 2024

Further debugging...

The error messages don't seem to directly come from the atto_styles javascript. Maybe indirectly, maybe it's missing some function override or variables that aren't set?

EDIT: Seems to happen on a focus event...

@danowar2k
Copy link
Contributor

danowar2k commented Nov 22, 2024

Oh my god, the cause seems to be outside the scope of atto_styles...

https://tracker.moodle.org/browse/MDL-69292

EDIT: I've read the issue and the comments, it seems to be a long standing problem with multiple attempts at solving it, of which every attempt so far led to breaking atto editor functionality.

Also happens using atto_title, by the way. Maybe every time you close a dropdown in atto.

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

No branches or pull requests

5 participants