You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I'm pretty new to RoR, but have been a longtime php dev, so I'm submitting these as "possible" bugs, since I may not fully grasp how the app functions or may have a missed a config step, etc.
Love the project and your work, as I downloaded the refresh branch and have been playing with it, I've noticed 3 bugs.
At /admin, When you begin typing your "idea" (title), and you arrive at /new, once the page attempts to save (via js), rails throws a route error: ActionController::RoutingError (No route matches [PUT] "/3/edit")
The fix is in edit.js, the path is incorrect:
--- a/app/assets/javascripts/admin/edit.js
+++ b/app/assets/javascripts/admin/edit.js
@@ -191,7 +191,7 @@ function savePost(callback) {
// If we just finished creating a new post
if (!state.post) {
- setFormAction('/edit/' + data.id);
+ setFormAction('/' + data.id);
setFormMethod('put');
}
Once that's fixed, if you
repeat those steps again (goto /admin, begin typing new post title, routed to /new),
then type some more so it registers and saves your post,
then press the "back" button at the top of the left navigation column to return to /admin,
wait a few seconds with the js console open, and ...
Javascript will throw an error and silently stop working. I've gotten it to throw two different errors: Cannot call method 'removeClass' of undefined on line 187 of admin/edit.js
and Cannot call method 'addClass' of undefined ... save on line 171 of admin/edit.js (which I assume save is the el.save obj).
Unfortunately I haven't dug in enough to understand the event flow and thus how to fix these.
In the content editor the 'Return' key doesn't work, no way to insert a new line!
The fix is in keyboard.js:
--- a/app/assets/javascripts/admin/keyboard.js
+++ b/app/assets/javascripts/admin/keyboard.js
@@ -83,10 +83,11 @@ $(window)
switch (e.which) {
// Enter
case 13:
- if (!state.beganEditing) {
- e.preventDefault();
- el.content.focus();
- }
+ break;
// Cmd
case 91:
key.cmd = true;
I searched the project and it doesn't look like the beganEditing property is being used anywhere (again, unless I'm missing something), so I removed the preventDefault.
Please let me know if this is helpful at all, or if I'm off base. I can submit pull req's for #'s 1 and 3 if it would help.
The text was updated successfully, but these errors were encountered:
First off, I'm pretty new to RoR, but have been a longtime php dev, so I'm submitting these as "possible" bugs, since I may not fully grasp how the app functions or may have a missed a config step, etc.
Love the project and your work, as I downloaded the refresh branch and have been playing with it, I've noticed 3 bugs.
ActionController::RoutingError (No route matches [PUT] "/3/edit")
The fix is in edit.js, the path is incorrect:
Javascript will throw an error and silently stop working. I've gotten it to throw two different errors:
Cannot call method 'removeClass' of undefined
on line 187 of admin/edit.jsand
Cannot call method 'addClass' of undefined ... save
on line 171 of admin/edit.js (which I assumesave
is the el.save obj).Unfortunately I haven't dug in enough to understand the event flow and thus how to fix these.
The fix is in keyboard.js:
I searched the project and it doesn't look like the beganEditing property is being used anywhere (again, unless I'm missing something), so I removed the preventDefault.
Please let me know if this is helpful at all, or if I'm off base. I can submit pull req's for #'s 1 and 3 if it would help.
The text was updated successfully, but these errors were encountered: