Commit Graph

10 Commits

Author SHA1 Message Date
Josef Šimánek
b0a258fa21 Update test link in ActionView javascripts README.md.
[ci skip]
2017-05-22 09:57:00 +02:00
Dmytro Vasin
db65f73f2e Fix mistake in JS response parser:
-
  Restore ability to accept ecmascript
  JS response should not modify DOM.
2017-04-13 16:58:36 +03:00
Dmytro Vasin
dc8ddea563 Set current page as default for ajax requests 2017-04-11 06:56:52 +03:00
Javan Makhmali
11341fdb3a Reorganize rails-ujs files 2017-03-30 14:41:17 -04:00
Ryunosuke Sato
40f226ae94 Fix link to rails-ujs
https://github.com/rails/rails-ujs is merged into actionview in favor of https://github.com/rails/rails/pull/28098.
[skip ci]
2017-03-30 01:10:20 +09:00
Patrick Toomey
9ca712348e
Prevent event propogation if element is disabled when event chain begins.
The existing UJS event behavior relies on browsers not sending events for
various events when an element is disabled. For example, imagine the following:

    <button type="submit" disabled="disabled">Click me</button>

The above button is disabled, so browsers will not trigger a click event and
all UJS behavior is prevented. However, imagine a button like this:

    <button type="submit" disabled="disabled"><strong>Click me</strong></button>

The above is treated differently by browsers such as Chrome/Safari. These
browsers do not consider the strong tag to be disabled, and will trigger click
events. UJS has logic to walk up the DOM to find an associated element subject
to UJS behavior. But, this logic does not take into account the disabled
status of the element.

I originally thought we could simply change the selectors used to match
elements to ignore disabled elements. However, UJS disables some elements as
part of the event chain. So, an element might match early in the chain and
then fail to match later. Instead of changing the selectors I added a callback
to the chain that calls `stopEverything` if an element is disabled when the
event chain begins.
2017-03-09 23:06:18 -07:00
Rafael Mendonça França
f24c2f09f8
Move rails-ujs README and LICENCE to actionview
We are going to make rails/rails the official repository
2017-02-22 13:49:27 -05:00
Guillermo Iguaran
41c33bd4b2 Import rails-ujs v0.1.0 from rails/rails-ujs 2017-02-20 14:29:55 +09:00
Akira Matsuda
650e46afbc s/an/a/
[ci skip]
2017-01-26 00:56:40 +09:00
Guillermo Iguaran
ad3a47759e Add rails-ujs to Action View 2016-11-26 01:23:07 -05:00