Opened 17 years ago
Closed 17 years ago
#1119 closed Bug (fixed)
Safari: undo button doesn't work after anchor creation
Reported by: | Aleksey Onopriyenko | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | Safari Compatibility |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Please load sample01.html
Then select some part of the text in editing area. Click on Insert/Edit Anchor button, enter any name for anchor and click OK button. Anchor has created. Then try to click on Undo button. Nothing happens (the button is not highlighted even). But Ctrl-Z works properly.
Change History (4)
comment:1 Changed 17 years ago by
Owner: | set to Martin Kou |
---|---|
Status: | new → assigned |
comment:2 Changed 17 years ago by
comment:3 Changed 17 years ago by
The toolbar button issue has been fixed with [744].
I can't find any way to make Safari handle Ctrl-Z/Ctrl-Y in JavaScript, though.
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've got some success at intercepting Ctrl-Z and Ctrl-Y in Safari with the keyup event. Although we can't cancel Safari's default actions to the hotkeys with the keyup event, we can still override the results for undo and redo.
I've committed the fix as [747].
The Ctrl-Z key actually does not work. The undo action you're seeing is the browser's built-in behavior, and not the work of our undo system. This might be impossible to fix for Safari though, as the onkeypress/onkeydown event hooks in Safari are not invoked for Ctrl or Alt key combinations.
The toolbar button does not work because the onmouseover/onmouseout/onclick event handlers are updated by JavaScript calls from the dialog window. And Safari seems to clear those function handlers when the dialog window closes. Thus, although the appearance of the toolbar button is changed, it still wouldn't react to mouse events.