Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot extend a Binding with an @-rule bind method #5

Closed
GoogleCodeExporter opened this issue Mar 19, 2015 · 9 comments
Closed

Cannot extend a Binding with an @-rule bind method #5

GoogleCodeExporter opened this issue Mar 19, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Run a base2 test in IE with a console or FirebugLite.
2. Inspect base2.DOM.Event.bind.toString()

What is the expected output? 

bind: function(event) {
  //-dean: put more fixes here
  this.base(event);
  event.target = event.srcElement;
  return event;
}

What do you see instead?

function(object) { return this(object); // cast }

What version of the product are you using? On what operating system?

Version 1.1, r14. Vista.

Please provide any additional information below.

I believe the issue is that the bind-aware implementation of extend in 
Binding can't find nested @rule versions of bind in _static, and so it 
overwrites them with this.bind.

Another way to test it is like so:

foo = base2.DOM.Binding.extend({}, {"@1":{bind:function(){extended!}}})
>> foo.bind remains Binding.bind


Original issue reported on code.google.com by scott.mi...@gmail.com on 26 Apr 2007 at 1:00

@GoogleCodeExporter
Copy link
Author

Ok, the actual expected output is

function() { // override
  var previous = this.base;
  this.base = ancestor;
  var returnValue = method.apply(this, arguments);
  this.base = previous;
  return returnValue;
};

but that's not really the point. ;)

Original comment by scott.mi...@gmail.com on 26 Apr 2007 at 1:21

@GoogleCodeExporter
Copy link
Author

Bind methods will be different for different browsers as each browser has a 
different
inheritance path depending on which features the browser has missing.

I don't really consider this a bug.

Original comment by dean.edw...@gmail.com on 1 May 2007 at 8:10

  • Added labels: Type-Other, Priority-Low
  • Removed labels: Type-Defect, Priority-Medium

@GoogleCodeExporter
Copy link
Author

Changed to "WontFix" (see my previous comment).

Original comment by dean.edw...@gmail.com on 1 May 2007 at 8:11

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Presumably, 

 event.target = event.srcElement;

is supposed to fire on IE, but it doesn't.

That's the point of the bug report. One of us is missing something. :)

Original comment by scott.mi...@gmail.com on 2 May 2007 at 1:36

@GoogleCodeExporter
Copy link
Author

> One of us is missing something.

OK. The penny the penny has dropped for me. I now see the problem. :-) 
Unfortunately
I don't have a copy of Vista. Can you supply your UA string please?

I'll reopen the bug...

Original comment by dean.edw...@gmail.com on 2 May 2007 at 3:26

  • Changed state: Accepted
  • Added labels: Type-Defect, Priority-Medium
  • Removed labels: Type-Other, Priority-Low

@GoogleCodeExporter
Copy link
Author

I'm sorry that the original bug report was so obtuse. I started with "hey, IE 
event 
fix isn't working" and ended up so drilled into your code that my but report 
was 
ultra-technical. 

Fwiw, this @ rule is working well:

    "@MSIE.+win": {
        bind: function(event) {

It's just that the special code in Binding for overriding 'bind' isn't allowing 
this 
version of bind to be mixed into Event, as described above.

Here is the UA string you asked for:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; 
.NET 
CLR 3.0.04506; .NET CLR 1.1.4322)

Original comment by scott.mi...@gmail.com on 2 May 2007 at 9:50

@GoogleCodeExporter
Copy link
Author

I think this is now fixed. Can someone test it for me? Preferably Scott. :-)

Original comment by dean.edw...@gmail.com on 19 Jun 2007 at 7:23

@GoogleCodeExporter
Copy link
Author

This is now fixed.

Original comment by dean.edw...@gmail.com on 3 Jul 2007 at 8:36

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by doek...@gmail.com on 14 Jul 2007 at 6:59

  • Added labels: Browser-MSIE, Module-base2.DOM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant