Closed Bug 532484 Opened 16 years ago Closed 12 years ago

Key Esc force-pauses SMIL animations

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: marek.raida, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091202 Minefield/3.7a1pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091202 Minefield/3.7a1pre Given URL is picked up randomly - it affects all SMIL animations... Key Esc works as Pause for SMIL animations, unless is its behavior prevented by script via evt.preventDefault() However, this is uncommon behavior I'm unable to find in any other SMIL supporting browser, so I believe it is unwanted. Reproducible: Always Steps to Reproduce: 1. Open page with SVG SMIL animation without scripting (to be sure there is no preventDefault method in use) 2. Press key Esc (Escape) 3. All animations stop and it is not possible to resume them without reloading page Actual Results: Animation is paused Expected Results: Animation should be unaffected It would be great to support some context menu or some other user friendly interface to allow pause/resume of SVG SMIL animations...
Version: unspecified → Trunk
I think this is by design, ESC should stop animations on the page like animated gifs but not plugins (not under pour control)
Component: General → SVG
Product: Firefox → Core
QA Contact: general → general
Yes, this behavior is by design, though I guess this does sorta break SVG documents/games/etc that use the "Esc" key. (Unless they use the "evt.preventDefault()" workaround mentioned in comment 0). For example, this game written by Marek uses "esc" to jump back to its menu: http://svg.kvalitne.cz/cavern/083/cavern.svg (I think it uses "evt.preventDefault()" to avoid this problem, though.) Perhaps we should reconsider this decision?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86 → All
Summary: Key Esc works as Pause for SMIL animations → Key Esc force-pause for SMIL animations
Summary: Key Esc force-pause for SMIL animations → Key Esc force-pauses SMIL animations
I'm not mad about the idea of pausing SMIL animation via the ESC key, FWIW. I'd rather have Pause/Resume Animation context menu items added dynamically when animation is active. Or something like that.
I think the bits of code in question are: http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresContext.cpp#1112 (called here: http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresContext.cpp#1168) http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsDocument.cpp#5339 I don't mind the current behaviour but I guess it should be a UI person who decides. I wonder if a possible solution would be to have ESC only pause SVG images sourced via an <img> element (which I don't think we support yet right?). The reason is that it seems to me you probably DON'T want the ESC behaviour when you're building web *applications* but if you're simply making web *pages* which have a few linked images then it would be nice to turn off annoying animations like you can with animated GIFs. One use case that comes to mind is animated SVGravatars(TM).* * Actually I haven't registered that tradmark, yet.
See also bug 499591.
See Also: → 499591
Esc no longer pauses SMIL. I think ESC is ignored now once a document has loaded.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.