This project is archived and is in readonly mode.

#1232 ✓wontfix
x-yuri

opera and execCommand

Reported by x-yuri | May 19th, 2011 @ 09:30 PM

The code like this:

  document.execCommand("BackgroundImageCache", false, true);

even wrapped in try..catch, could make opera 10 insert br right after opening body tag. This was fixed in opera 10.50 (at least this statement doesn't trigger error). Here's the reproduce code:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
    <div style="
        border: 1px solid red;
    "></div>
    <script type="text/javascript">
        try {
            document.execCommand('BackgroundImageCache', false, true);
        } catch(e) {
            d(e.message);
        }

        d(window.opera.version());
        d(document.body.innerHTML);

        function d(s){
            document.body.appendChild(document.createTextNode(s));
            document.body.appendChild(document.createElement('br'));
        }
    </script>
</body>
</html>

The problem is that you execute this statement for every browser:
https://github.com/mootools/mootools-core/blob/master/Source/Browse...

Comments and changes to this ticket

  • x-yuri

    x-yuri May 19th, 2011 @ 09:34 PM

    • Tag changed from opera execcommand backgroundimagecache to backgroundimagecache, execcommand, opera

    Here is a discussion of a problem

  • fakedarren

    fakedarren July 16th, 2011 @ 03:54 PM

    • State changed from “new” to “wontfix”
    • Assigned user set to “fakedarren”

    Hi,

    I am closing this ticket as this has been fixed in newer Opera versions (currently 11.50)

    Regards
    Darren

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages