WHITESPINE
WHITESPINE
Explore posts from servers
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
Tbh I didn't know ctrl+s worked - I was simply referring to the buttons. That's an improvement, at least
25 replies
TTyphonJS
Created by geoidesic on 9/19/2023 in #typhonjs-runtime
How to get rid of funky Prosemirror overlap
Though I'm trying from the MCE editor
14 replies
TTyphonJS
Created by geoidesic on 9/19/2023 in #typhonjs-runtime
How to get rid of funky Prosemirror overlap
I've still not managed to get an editor that grows with its content, haha
14 replies
TTyphonJS
Created by WHITESPINE on 8/5/2023 in #typhonjs-runtime
TJSApplication Character Sheet odd behavior with unlinked tokens
monkyippee thanks
10 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
Thanks, I'll just use mce then for the time being
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
Another wrinkle: Setting button to true and individually summoning each ProseMirror appears to resolve the save-aliasing issue.
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
My best guess was that something in the wrapping component was capturing or intercepting clicks but it doesn't really seem like that is the case
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
There's a specific prosemirror.js function that actually sets up the paragraph/font dropdowns:
/**
* Attach event listeners.
* @param {HTMLMenuElement} html The root menu element.
*/
activateListeners(html) {
if ( !this.#onAction ) return;
html.querySelectorAll(`.pm-dropdown.${this.#cssClass} li`).forEach(item => {
item.addEventListener("click", event => {
this.#onAction(event);
});
});
}
/**
* Attach event listeners.
* @param {HTMLMenuElement} html The root menu element.
*/
activateListeners(html) {
if ( !this.#onAction ) return;
html.querySelectorAll(`.pm-dropdown.${this.#cssClass} li`).forEach(item => {
item.addEventListener("click", event => {
this.#onAction(event);
});
});
}
For the listeners are being created in the TJS ProseMirror, but for whatever reason the events are never being fired
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
Same foundry install 5E prosemirror editors work. Additionally, even within the TJS world / dev server, utilizing the Journal prosemirrors work. I haven't really observed anything different in how they initialize listeners
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
The event listeners are getting setup properly they just aren't actually firing
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
I'll check when I get home assuming 5e system uses it
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
Paragraph/Font appears to be a firefox only issue
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
I can try again though
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
I tried to trace it through but I have almost no idea where the actual element is being passed in
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
Can't promise much there honestly
25 replies
TTyphonJS
Created by WHITESPINE on 8/22/2023 in #typhonjs-runtime
Bug: Multiple ProseMirror editors on same svelte component do not save properly
The Paragraph/Font panels also appear to have no effect, in the same minimal configuration pasted above.
25 replies
TTyphonJS
Created by WHITESPINE on 8/5/2023 in #typhonjs-runtime
TJSApplication Character Sheet odd behavior with unlinked tokens
Oh right I forgot I can just define that in my subclass. Yeah that's the only remaining issue
10 replies
TTyphonJS
Created by WHITESPINE on 8/5/2023 in #typhonjs-runtime
TJSApplication Character Sheet odd behavior with unlinked tokens
Mostly solved :)
10 replies
TTyphonJS
Created by WHITESPINE on 8/5/2023 in #typhonjs-runtime
TJSApplication Character Sheet odd behavior with unlinked tokens
Oh wait - editing things in node_modules doesn't seem to immediately apply the changes in browser - even after restarting dev server / explicitly running npm run build Had to edit vite cache
10 replies
TTyphonJS
Created by WHITESPINE on 8/5/2023 in #typhonjs-runtime
TJSApplication Character Sheet odd behavior with unlinked tokens
Solution as posted didn't exactly work - gonna iterate on it a bit. Solution worked, thanks. Just had to delete vite-cache. Also discovered another minor issue: When drag re-ordering an item in the items sidebar tab, if that item is configured to use a TJSApplication sheet, it will cause the following error: Uncaught (in promise) TypeError: doc.sheet.submit is not a function Due to the following foundry behavior:
async sortRelative({updateData={}, ...sortOptions}={}) {
const sorting = SortingHelpers.performIntegerSort(this, sortOptions);
const updates = [];
for ( let s of sorting ) {
const doc = s.target;
const update = foundry.utils.mergeObject(updateData, s.update, {inplace: false});
update._id = doc._id;
if ( doc.sheet && doc.sheet.rendered ) await doc.sheet.submit({updateData: update}); // <------------- HERE!
else updates.push(update);
}
if ( updates.length ) await this.constructor.updateDocuments(updates, {parent: this.parent, pack: this.pack});
return this;
}
async sortRelative({updateData={}, ...sortOptions}={}) {
const sorting = SortingHelpers.performIntegerSort(this, sortOptions);
const updates = [];
for ( let s of sorting ) {
const doc = s.target;
const update = foundry.utils.mergeObject(updateData, s.update, {inplace: false});
update._id = doc._id;
if ( doc.sheet && doc.sheet.rendered ) await doc.sheet.submit({updateData: update}); // <------------- HERE!
else updates.push(update);
}
if ( updates.length ) await this.constructor.updateDocuments(updates, {parent: this.parent, pack: this.pack});
return this;
}
I assume this is just because TJSApplication was really just meant to replace Application, not FormApplication, and is thus missing some functionality. An eventual TJSDocumentSheet (or something) would hopefully resolve it - in the meantime I am not super concerned, item sorting isn't exactly mission critical
10 replies