Last modified: 2014-08-13 23:40:55 UTC
I see that a cancel button has been added, which is an improvement, but the escape key should also cancel edit mode.
The escape key is used by browsers to defocus (blur) currently focused form element. Reusing it for this would be really annoying.
What browsers? Not Chrome or Firefox. I don't have IE here to test with, but I doubt it does it either. http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_event_blur_alert
Opera does that; it's useful enough that I expected other browsers to behave similarly. IE8 resets the value to the default (for both inputs and textareas). And Firefox apparently doesn't do anything, like you said.
OK, but my next question is: What form fields are people going to be interacting with when in the main Visualeditor? The only form field I see is the search box.
I think this isn't a bad idea, though I'm a little troubled if this causes unexpected behaviour for users of some browsers.
On macs, cancel is usually cmd-. Wouldn't mind having that in VE.
I'd like to note that really this should only happen iff someone is exclusively in edit mode. IOW, if someone has opened the template inspector, close that. Link inspector, close that - so on and so forth.
Agreed, that's how I envisioned it.
Clarify title so it's clear we all agree.
Yes, pressing escape when in a dialog should close that level of the dialog (if more than one) or the dialog if it's at the top level of the dialog. If a change was confirmed then it should remain when closed, if a change was unconfirmed it should be cancelled. With no dialogs open, escape should exit VE but should ask for confirmation before doing so if there are unsaved changes. That dialog should have keyboard actions such that enter confirms you want to leave and escape indicates that you don't want to leave and take you back to the VE. This will stop people losing work if they hit esc accidentally or too many times.
I'm a bit worried about this. What if I'm in a template dialog and accidentally press Esc twice/too long? If this triggered the "Do you really wnt to exit?" confirmation, it might be okay. However, I suspect that this might not have the ultimate effect that was intended.
(In reply to WhatamIdoing from comment #11) > I'm a bit worried about this. What if I'm in a template dialog and > accidentally press Esc twice/too long? If this triggered the "Do you really > wnt to exit?" confirmation, it might be okay. However, I suspect that this > might not have the ultimate effect that was intended. Comment 10 asks for the unsaved changes warning to be shown. If we do that, I think it'll be fine. Pressing escape while a dialog is open will dismiss that dialog with a safe action (the cancel/never mind action). So if you press escape again when the unsaved changes warning is visible, that'll dismiss the warning with the safe action, which is "never mind, I want to continue editing". So if you press Esc a bunch of times or hold it too long, you'll end up in a loop of the unsaved changes warning appearing and being dismissed.